this page opens in a pop up where it fetches an image from the Database ...everything works perfect except for passing the id part..
i'm tired of trying and i kept 5 days googling but could not solve it !!
any help would be appreciated .. here's the line that drove me crazy
<A HREF='javascript:popup("page.php?id=$id"...
this $id was sent to this page by another page and now i want to resent it to some other page (page.php) i assumed it's already known for this page so i used it directly $id

its not coming via post Nor get
i got this id from alink <a href='edit_news.php?id=$id'>
okay..
then in the second page i write $id=$_REQUEST[id]; so now i have this id on that second page and when i echo this id it gives me the correct one But on this second page i need to sent that SAME id to the pop up ????? that's my problem

Hey,

I think you should use something like this.

<A HREF='javascript:popup("page.php?id='.$id. '... "')

This is how a link is dynamically generated in PHP.

Hope this helps!

Hey,

I think you should use something like this.


This is how a link is dynamically generated in PHP.

Hope this helps!

i tried this but not working still can't view my image

The server doesn't parse the $id variable because you don't have a php delimiter. It should be something like:

<a href='edit_news.php?id=<?php echo $id;?>'>edit</a>

The server doesn't parse the $id variable because you don't have a php delimiter. It should be something like:

<a href='edit_news.php?id=<?php echo $id;?>'>edit</a>

By God, How did I miss that?
Thanks buddy.

Bye!

Show the code for the popup.

You have to extract the information from the link.

ex: <a href="page.php?id=<?=$id;?>">edit</a>

To use the id you have to extract it from the link.
<?php
session_start();
extract( $_GET);

$the_id = $_GET;

Now you have past on the information from the link to an variable on PHP.

But, for more details post some code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.