...

View Full Version : correcting the syntax



Bob42
11-14-2007, 02:18 AM
I need some help with small bit of code. I'm sure that the syntax of the code is incorrect, which is why I'm getting the error message. Could someone help me get the syntax correct?



echo "<tr>
<td align=\"center\"><b>Picslink:</b></td>
<td align=\"center\"><input type=\"text\" name=\"picslink\" value=\"{$row['picslink']}\" />
<a href=\"<?php echo $PHP_SELF; ?>?table=<?php echo $table; ?>&id=<?php echo $row['picslink']; ?>&mode=edit\" />Edit</a>
</tr>";


The part that's wrong is the '<a href= blah blah blah>' part. Here's the error message I get:


Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/user/public_html/dex/24r/php/insertinfo4.php on line 33

Line 33 is the '<a href blah blah blah>' part

Inigoesdr
11-14-2007, 02:26 AM
echo "<tr>
<td align=\"center\"><b>Picslink:</b></td>
<td align=\"center\"><input type=\"text\" name=\"picslink\" value=\"{$row['picslink']}\" />
<a href=\"{$_SERVER['PHP_SELF']}?table=$table&id={$row['picslink']}&mode=edit\" />Edit</a>
</tr>";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum