...

View Full Version : Embed window.confirm() into PHP



holty
12-23-2003, 10:42 AM
Hi

I would like to embed a confirm into my php....


echo ('td><a href="delete.php?id='. $custid .'" onClick="return window.confirm('Are you sure you want to delete this record?')">Delete</a></td>');


i get parse errors - what is the correct syntax to allow this confirm to work?

Thanks:)

fredmv
12-23-2003, 11:36 AM
echo '<td><a href="delete.php?id='. $custid .'" onclick="return confirm(\\'Are you sure you want to delete this record?\\')">Delete</a></td>';

holty
12-23-2003, 01:08 PM
Cheers - works a treat! many thanks!

fredmv
12-23-2003, 01:10 PM
You're quite welcome. ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum