Jump to content

[SOLVED] concatenating a line of code


coutts

Recommended Posts

Hello:

Could anyone tell me why the code below does not work ie no confirmation box. I have tested the code as plain HTML/javascript and the idea works when written like:

<a href="delete.php?id=1" onclick="return confirm('Are you sure');">Delete</a>

but I have clearly put it together wrong for PHP - I do know that probably it can be written with less joins "." but that is the only way I can "see" what I am doing at all.

 

Thanks

Robert

 

 

echo( "<a href=\"delete.php?id=" . "$row['ID']" . "\"" . " \"return confirm('Are you sure');\">"  . "DELETE" . "</a>"  );

Link to comment
https://forums.phpfreaks.com/topic/118278-solved-concatenating-a-line-of-code/
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.