Jump to content

Syntax Error...


Wayniac

Recommended Posts

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

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

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

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.