0

i have a link on zoom.php here i have a link where iam send image_id

<a href=\"editimage.php?img=$image_id\">Edit</a>

now i have a editimage.php where i reciving the image_id.

$image_id_g = isset($_GET['img']) ? $_GET['img'] : 0;

but i printing always 0's but i want to print the image id here

i also tried.but it say variable not found (img image_id)

$image_id = $_GET['image_id'];
$image_id = $_GET['img'];
3
Contributors
7
Replies
9
Views
5 Years
Discussion Span
Last Post by urtrivedi
1

you need to echo $image_id in link, otherwise you will not receive actually image id value.

<a href=\"editimage.php?img=<?php echo $image_id ?>\">Edit</a>

To check how value passed in your editimage.php, you can dump variables in the beginging

<?php
//editimage.php
echo "<pre>";
print_r($_GET);
echo "</pre>";
.
.
.
other code

?>

Edited by urtrivedi

0

o i for got to say that i already have php echo for ex

<?php
echo"
    <a href=\"editimage.php?img=$image_id\">Edit</a>
";
?>
0

i cant revice it tho.

$image_id_g = isset($_GET['img']) ? $_GET['img'] : 0;

iam doing this to get the image_id but i get 0 every time -_-

0

Have you echo what i sent you in previous post

<?php
//editimage.php
echo "<pre>";
print_r($_GET);
echo "</pre>";
.
.
.
other code
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.