gavin.sibley Posted May 28, 2012 Share Posted May 28, 2012 Hello, i have a page that retrieves information from a database, if i echo out $slide[ip] it will display the correct information. How can i send this information to another page? scenario: 1. i have a page that retrieves the information 2. when i press download on that page i need the ip field to be able to be sent to the script that generates the download. any ideas? many thanks, Gavin Quote Link to comment https://forums.phpfreaks.com/topic/263269-post-information-retrieved-from-database/ Share on other sites More sharing options...
wigwambam Posted May 28, 2012 Share Posted May 28, 2012 You could create a form with the [download] button that posts to your script, pass: <input type="hidden" name="ip" value="<?php echo $slide[ip]; ?>" /> In your second page, check for $_POST['ip'] Quote Link to comment https://forums.phpfreaks.com/topic/263269-post-information-retrieved-from-database/#findComment-1349254 Share on other sites More sharing options...
Kristoff1875 Posted May 28, 2012 Share Posted May 28, 2012 I'm no expert, but maybe you could start a session and then run the query putting the variables in to the session? You can then call on the session variable whenever you want to when the session is open? Quote Link to comment https://forums.phpfreaks.com/topic/263269-post-information-retrieved-from-database/#findComment-1349286 Share on other sites More sharing options...
gavin.sibley Posted May 29, 2012 Author Share Posted May 29, 2012 Hello Wigwambam, thanks for your reply. i am a novice to php though (just trying to fix a website that someone else broke) is there any chance you could tell me how to do what you said, if i post the code for the current button? <?php if($slide[upload_photo_zip] == "none"){ echo("Not Uploaded Yet"); }else{ echo("<a href='http://www.mydomain.co.uk/generate.php'>Download</a>"); } ?>)</em></td> thats the code for the curent download button. if you could tell me how to insert your suggestion into this that would be great, i have had a go but cant seem to get it working? many thanks, gavin Quote Link to comment https://forums.phpfreaks.com/topic/263269-post-information-retrieved-from-database/#findComment-1349457 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.