Code Newbie
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 Newbie
    forums
Old 02-10-2003, 12:19 PM   #1 (permalink)
Sarlok
Registered User
 
Join Date: Feb 2003
Location: Nowhere special
Posts: 10
Sarlok is on a distinguished road
Send a message via ICQ to Sarlok
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 is offline   Reply With Quote
Old 02-10-2003, 12:40 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,471
sde is on a distinguished road
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 is offline   Reply With Quote
Old 02-10-2003, 01:06 PM   #3 (permalink)
Sarlok
Registered User
 
Join Date: Feb 2003
Location: Nowhere special
Posts: 10
Sarlok is on a distinguished road
Send a message via ICQ to Sarlok
Excellent. Thanks.
Sarlok is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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.


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