no idea what to do...
Posted on
16th Feb 2014 07:03 pm by
admin
I'm fed up. I had issues with code that I have working on a different site that didn't work on my current site. I found a way to fix that but now I'm running into the same error on another page that I can't think of a way around:
'Parse error: syntax error, unexpected T_VARIABLE, expecting ']' in /my/path/to/file on line 75'
Here's the original code: (ine 75 is the line with the link in it.)
Did you know?Explore Trending and Topic pages for more stories like this.
Code: <?php
$adquery = "SELECT * FROM ad_space WHERE id=1";
$adresult = mysql_query($adquery);
$adrow = mysql_fetch_assoc($adresult);
for($i=1;$i<6;$i++){
if($row['link'.$i] == '') {
$row['link'.$i] = '#';
}
echo "<a href="$row[link$i]" target="_blank"><img src="$row[image$i]" alt="$i" /></a>";
}
?>
I changed it to this hoping it would work but it didnt, values are blank.
Code: <?php
$adquery = "SELECT * FROM ad_space WHERE id=1";
$adresult = mysql_query($adquery);
$adrow = mysql_fetch_assoc($adresult);
for($i=1;$i<6;$i++){
$var = "link".$i;
$var2 = "image".$i;
if($row['link'.$i] == '') {
$row['link'.$i] = '#';
}
echo "<a href="$row[$var]" target="_blank"><img src="$row[$var2]" alt="$i" /></a>";
}
?>
As always, any help is appreciated.
Thanks,
No comments posted yet
Your Answer:
Login to answer
329
40
Other forums
Registration
ok so i have a site where people can register and login which works now thanks to someone on here th
restricting another login once you logout
Hello,
how can I restrict a page from login authenticating against info in a MySQL DB for a s
disable all input buttons
Hello Friends,
suppose i do have a file ( file.php ) has a submit button
Code: [Sele
Parse Error
Hi Guys,
I have a function in my class which returns a string link variable. The problem is i
selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c
Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had
Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment
How to write on database when a link is clicked?
Hi,
I have a list of products in a gridview. When the link is clicked currently it takes to an ext
unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error
.htpasswd Registration Form
Hi,
I wanted to make an htpasswd registration form.
I found this code on the internet but have