PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
roby2411
Forum Newbie
Posts: 13 Joined: Tue Sep 12, 2006 9:52 am
Post
by roby2411 » Fri Sep 15, 2006 7:18 pm
dear all my u tell how pass variables automatically between to pages without using form
i need a function that looks like
Code: Select all
function post_data($value)
{
post ( "http://www.sitename.com:5050" , $value )
}
what should i do
neophyte
DevNet Resident
Posts: 1537 Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota
Post
by neophyte » Fri Sep 15, 2006 8:13 pm
If you want to post a form with user submission there's CURL functions.
If you just want to store data how about $_SESSION['someVar'] = $variable;
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Fri Sep 15, 2006 8:19 pm
yep, sounds like a job for
php sessions
roby2411
Forum Newbie
Posts: 13 Joined: Tue Sep 12, 2006 9:52 am
Post
by roby2411 » Fri Sep 15, 2006 8:57 pm
and how if i need to post variable without forms and without submit
neophyte
DevNet Resident
Posts: 1537 Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota
Post
by neophyte » Fri Sep 15, 2006 9:27 pm
Code: Select all
//Put this before all HTML.
session_start();
//Then save your post variable to:
$_SESSION['variable'] = $your_variable_to_store;
On the next page.