Jump to content

[SOLVED] return confirm didn't pass the value


robert_gsfame

Recommended Posts

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?

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.