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
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
Share on other sites

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
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
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.