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
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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.