Jump to content

Passing variables between files


lmcm2008

Recommended Posts

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

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.