This is the code. editor.php is the link. photo_id is the the information i want to pass over. $photo[‘picture’] is the photo.
print ('<a href="editor.php?photo_id='.$photo['id'].'"><img src='{$photo['picture']}'.'</a>'./>');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just use
session_start();and put you link in a$_SESSION['last_link'];and use the same function on the next page and access the value you have put in$_SESSION['last_link']to get information about the photo and display it.PHP Sessions
Or, if you used that kind of link, in the
editor.phpyou can use$_GET['photo_id']to get the id of your photo, after the user have clicked on the image to follow the link.Edit 1:
You could try putting the right concatenation:
try this:
echo '<a href="editor.php?photo_id='.$photo['id'].'"><img src='.$photo['picture'].' /></a>';