robert_gsfame Posted September 26, 2009 Share Posted September 26, 2009 okay i want to pass the value on url let say $number =101 page2.php $id=$_GET['number']; echo $id; echo "<a href=page2.php?number=$number onclick='return confirm(\'Are you sure to remove this image?\')'>page2</a>"; if i use the code above then i will get on page2.php 101 but the return confirm didn't work if i use this echo '<a href=page2.php?number=$number onclick="return confirm(\'Are you sure to remove this image?\')">page2</a>'; then return confirm works but i will get nothing on page2.php and what i see on the url is this page2.php?number=$number <-----------didn't get the value what to do then? Link to comment https://forums.phpfreaks.com/topic/175605-solved-return-confirm-didnt-pass-the-value/ Share on other sites More sharing options...
smerny Posted September 26, 2009 Share Posted September 26, 2009 try echo '<a href=page2.php?number='.$number.' onclick="return confirm(\'Are you sure to remove this image?\')">page2</a>'; Link to comment https://forums.phpfreaks.com/topic/175605-solved-return-confirm-didnt-pass-the-value/#findComment-925330 Share on other sites More sharing options...
robert_gsfame Posted September 26, 2009 Author Share Posted September 26, 2009 yes it works...thanx a lot for your quick help Link to comment https://forums.phpfreaks.com/topic/175605-solved-return-confirm-didnt-pass-the-value/#findComment-925331 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.