News
Forums
Search
Members
Sign Up
My Code Newbie
Username
Password
Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET
C.N. Friends
Planet Rome
Link to Us!
Code Newbie
Code Forums
>
Application and Web Development
>
PHP
Querystrings... www.foo.com/?=foo
User Name
Remember Me?
Password
Register
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
LinkBack
Thread Tools
Display Modes
02-10-2003, 12:19 PM
#
1
(
permalink
)
Sarlok
Registered User
Join Date: Feb 2003
Location: Nowhere special
Posts: 10
Querystrings... www.foo.com/?=foo
Hello.
A fairly simple question, with I'm hoping, an equally simple answer.
How do I get info from querystrings?
And is there ayn special way I have to store it?
Thanks
Sarlok
View Public Profile
Visit Sarlok's homepage!
Find More Posts by Sarlok
02-10-2003, 12:40 PM
#
2
(
permalink
)
sde
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,471
this example i'll use:
http://www.codenewbie.com/?foo=bar
PHP Code:
<?
echo
$foo
;
?>
that will print "bar"
now sometimes global variables will be turned off in some php configurations, so you will have to use the following. when you send variables in the url, you are using the 'GET' method.
PHP Code:
<?
echo
$_GET
[
'foo'
];
?>
this will also print "bar"
hope this helps.
sde
View Public Profile
Visit sde's homepage!
Find More Posts by sde
02-10-2003, 01:06 PM
#
3
(
permalink
)
Sarlok
Registered User
Join Date: Feb 2003
Location: Nowhere special
Posts: 10
Excellent. Thanks.
Sarlok
View Public Profile
Visit Sarlok's homepage!
Find More Posts by Sarlok
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
All times are GMT -8. The time now is
04:00 PM
.
Contact Us
-
CodeNewbie.com
-
Archive
-
Top
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO
3.0.0 RC8
Copyright © 2000-2008,
Milano Interactive
Web Hosting provided by
Portal 360 Web Hosting
LinkBack
LinkBack URL
About LinkBacks