lmcm2008 Posted October 20, 2011 Share Posted October 20, 2011 Hi: I would like to pass a value inside a variable between files... without usng sessions. I don´t want to use sessions... I don´t know if I can do this... File1.php: $transmit=$_POST['123']; File2.php: $receive=$_GET['$transmit']; echo "value receipt: $receive"; And in the file2.php, $receive.... I will receive 123 as I want to transmit from file1.php ( example string "123" as a value ) ???? Thanks a lot. Regards Link to comment https://forums.phpfreaks.com/topic/249438-passing-variables-between-files/ Share on other sites More sharing options...
voip03 Posted October 20, 2011 Share Posted October 20, 2011 Passing variable values between pages session cookies URL Web Forms http://matthom.com/archive/2005/02/19/php-passing-variables-across-pages Link to comment https://forums.phpfreaks.com/topic/249438-passing-variables-between-files/#findComment-1280748 Share on other sites More sharing options...
Dusaro Posted October 20, 2011 Share Posted October 20, 2011 If your using $_POST in one you don't use $_GET in the other... When using $_POST in file 1, use it in file 2. Link to comment https://forums.phpfreaks.com/topic/249438-passing-variables-between-files/#findComment-1280782 Share on other sites More sharing options...
lmcm2008 Posted October 20, 2011 Author Share Posted October 20, 2011 The thing that I´m trying is to avoid when i made a <href=file2.php> and thansmit a variable I had to do it using href=file2.php?=$var, so it transmit the variable on the URL and I would like to avoid that... BUT.. I don´t know how to do it... I have a lot of images like thumbs on a first file and when you click, go to other file and with the variable that I transmit... open bigger that image... Any idea..?? Thanks. Link to comment https://forums.phpfreaks.com/topic/249438-passing-variables-between-files/#findComment-1280850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.