Jump to content

Delete Confirmation


yash87

Recommended Posts

hI, im trying to create a delete confirmation box.

This particular line is showing error as below :

 

Parse error: parse error, expecting `','' or `';'' in C:\wamp\www\i-document\search_admin.php on line 103

 

Plz help. thankz.

 

echo "<td><a href=" . $rows['url'] . ">" . $rows['url'] . "</a></td>";
echo "<td><a href=edit_doc.php?id=" . $rows['id'] . ">Edit</a></td>";
echo "<td><a href=delete.php?id=" . $rows['id'] ." onClick="return confirm('Are you sure you want to delete?');">Delete</a></td>";

Link to comment
https://forums.phpfreaks.com/topic/216848-delete-confirmation/
Share on other sites

try escaping your double quotes in last line with backslash where you have the JavaScript :

 

 

echo "<td><a href=delete.php?id=" . $rows['id'] ." onclick=\"return confirm('Are you sure you want to delete?');\">Delete</a></td>";

 

www.wigpip.com.au

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/216848-delete-confirmation/#findComment-1126504
Share on other sites

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.