Wayniac Posted April 8, 2010 Share Posted April 8, 2010 I'm having a syntax error and can't seem to track it down... The problem lies somehwere in between "<a href=\"javascript:confirmDelete('main_delete_admin.php?spreadsheetid=$myrow" . "$spreadsheetid" . $row["spreadsheetid"]') . \">" . "<span class=\"text_bold\">" . "Delete " . "</a>" Here is the full code for this section... echo("<td>" . "<a href=\"main_more.php?spreadsheetid=" . "$spreadsheetid" . $row["spreadsheetid"] . "\">" . "<span class=\"text_bold\">" . "Read" . "</span>" . "</a>" . "<span class=\"text_bold\">" . " || " . "<a href=\"main_edit_admin.php?spreadsheetid=$myrow" . "$spreadsheetid" . $row["spreadsheetid"] . "\">" . "<span class=\"text_bold\">" . "Edit" . "</a>" . "</span>" . "<span class=\"text_bold\">" . " || " . "</a>" . "</span>" . "<a href=\"javascript:confirmDelete('main_delete_admin.php?spreadsheetid=$myrow" . "$spreadsheetid" . $row["spreadsheetid"]') . \">" . "<span class=\"text_bold\">" . "Delete " . "</a>" . "<br>" . "</span>" . "</td>"); Thank you Link to comment https://forums.phpfreaks.com/topic/198030-syntax-error/ Share on other sites More sharing options...
taquitosensei Posted April 8, 2010 Share Posted April 8, 2010 I think you're a little overzealous in your quotage and concatenatation echo("<td><a href='main_more.php?spreadsheetid=" .$spreadsheetid.$row["spreadsheetid"] ."'><span class='text_bold'>Read</span></a><span class='text_bold'>||<a href='main_edit_admin.php?spreadsheetid=".$myrow.$spreadsheetid.$row['spreadsheetid']."'><span class='text_bold'>Edit</a></span><span class='text_bold'> || </a></span><a href='javascript:confirmDelete(\'main_delete_admin.php?spreadsheetid=".$myrow.$spreadsheetid.$row['spreadsheetid']\");'><span class='text_bold'>Delete</a><br></span></td>"); There might still be a problem with the quotes in the javascript but you should get the idea. Link to comment https://forums.phpfreaks.com/topic/198030-syntax-error/#findComment-1039121 Share on other sites More sharing options...
Wayniac Posted April 8, 2010 Author Share Posted April 8, 2010 Thank you Taq, that helped with the cleanup... Your right, its still going to have the same issue with getting the quotations or brackets in the Javascript... I now have a Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING Link to comment https://forums.phpfreaks.com/topic/198030-syntax-error/#findComment-1039183 Share on other sites More sharing options...
taquitosensei Posted April 8, 2010 Share Posted April 8, 2010 Try this I forgot to add the concatenator after the php variable and I had mismatched single and double quotes. If this doesn't work just keep messing with it until it works. echo("<td><a href='main_more.php?spreadsheetid=" .$spreadsheetid.$row["spreadsheetid"] ."'><span class='text_bold'>Read</span></a><span class='text_bold'>||<a href='main_edit_admin.php?spreadsheetid=".$myrow.$spreadsheetid.$row['spreadsheetid']."'><span class='text_bold'>Edit</a></span><span class='text_bold'> || </a></span><a href='javascript:confirmDelete(\"main_delete_admin.php?spreadsheetid=".$myrow.$spreadsheetid.$row['spreadsheetid']."\");'><span class='text_bold'>Delete</a><br></span></td>"); There might still be a problem with the quotes in the javascript but you should get the idea. Link to comment https://forums.phpfreaks.com/topic/198030-syntax-error/#findComment-1039197 Share on other sites More sharing options...
Wayniac Posted April 19, 2010 Author Share Posted April 19, 2010 Thank you taquitosensei, sorry for the late reply. Had a serious case of no internet for a while due to some unfortunate circumstance. You last entry fixed the issue, thank you so much Link to comment https://forums.phpfreaks.com/topic/198030-syntax-error/#findComment-1044635 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.