
January 1st, 2013, 07:29 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 14
Time spent in forums: 4 h 9 m 22 sec
Reputation Power: 0
|
|
|
PHP-General - Pass variable in link from one PHP page to another
So, I will go directly to the problem. I'm trying to pass a variable with a URL like this:
PHP Code:
echo "<a href='editImage.php?liink=$link2'>Edit</a>";
where the variable $link2 is a link to an image. This works fine, the problem is when I'm trying to use $_REQUEST in editImage.php to catch the variable.
In editImage.php I do this:
PHP Code:
$liink = $_REQUEST["liink"];
But $liink does not receive a value, it's empty. After this I just want to put the variable in a query and execute the query. When doing this I get this message from the browser:
Code:
Notice: Undefined index: liink in /path/editImage.php on line 20
where line 20 is the above REQUEST line. I have also tried this with $_GET but it's not working.
I have searched on the forum and on google but I can't solve this one. Please help me, I would appreciate it so much.
|