Jump to content

Passing PHP variables from script to script


Lord Cupid

Recommended Posts

What's the best way to pass PHP variables from one script to the other? My input forms comprise several pages using AJAX to call up each form.Unfortunately, when a new PHP script loads, it forgets what the other variables were.How about an invisible window with php variables? In which case, how to transfer them?

Link to comment
Share on other sites

Hi, let me see if i get this right, you have a main file, and then you call other content via ajax?well if thats the case why don't you try keeping your info in a hidden input in your first/main file, so the other parts could pick it up.

Link to comment
Share on other sites

Hi, let me see if i get this right, you have a main file, and then you call other content via ajax?well if thats the case why don't you try keeping your info in a hidden input in your first/main file, so the other parts could pick it up.
ok, I'll give it a try.
Link to comment
Share on other sites

ok, I'll give it a try.
Oh, here's why that won't work: the main file gets replaced by subsequent php files and when that happens, everything is lost!I did read where Sessions should do the job. I'll give that a try.
Link to comment
Share on other sites

TAKEN FROM THE PHP MANUALSessionsSession support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. All information is in the Session reference section.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...