470,815 Members | 1,300 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Pass parameter to new page

With psp, how can I go to another page and pass a parameter to it?

Thanks, Robert
Mar 18 '06 #1
7 1956
Sorry, I meant php.

"Robert" <no****@spamfree.com> wrote in message
news:Fn*****************@tornado.texas.rr.com...
With psp, how can I go to another page and pass a parameter to it?

Thanks, Robert

Mar 18 '06 #2
Robert wrote:
Sorry, I meant php.
:) "Robert" <no****@spamfree.com> wrote in message
news:Fn*****************@tornado.texas.rr.com...
With psp, how can I go to another page and pass a parameter to it?

You could pass the information in a session.

--
Ian Collins.
Mar 18 '06 #3
you can pass parametres in main 3 ways:

direcot ways

session()
HTTP_GET
HTTP_POST

sesison writes a cookie in your system
HTTP_GET uses the GET method
HTTP_POST uses the post method

Cheers

Mar 18 '06 #4
why not the simply redirect to:
newpage.php?parameter1=value&parameter2=value

and use a $_GET to process the parameters! I found it much easier and
faster then using the session...maybe I'm wrong! (never much used
sessions)

Mar 18 '06 #5
Robert in news:Fn*****************@tornado.texas.rr.com wrote:
With psp, how can I go to another page and pass a parameter to it?


Shortest way: use HTTP 1.1 Redirect.

header("Location: http://$_SERVER[HTTP_HOST]" . full_path_to_dest_page .
"?param=$value");

--
ColdShine

"Experience is a hard teacher: she gives the test first, the lesson
afterwards." - Vernon Sanders law
Mar 18 '06 #6
There needs to be some balance between security and speed. If you're
looking for speed in your coding use $_GET but that's not recommended
if you're concerned about security. Your other alternative is the
$_SESSION global variable. Reference...
http://www.php.net/manual/en/ref.session.php for more info.

Regards,
Gerard.

Mar 18 '06 #7
Got it! Many thanks to each of you.
I am just learning this stuff, as you can easily see.

Robert

"Robert" <no****@spamfree.com> wrote in message
news:Fn*****************@tornado.texas.rr.com...
With psp, how can I go to another page and pass a parameter to it?

Thanks, Robert

Mar 18 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Chris | last post: by
3 posts views Thread by David C | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.