php querystring
Moderator: General Moderators
php querystring
Hi all, im new to php and i cant for the life of me work out how to do a querystring in php. looked at loads of tutorials.... none work. has anyone got a simple example they can give me? i can expand from there?
thanks
thanks
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: php querystring
Access the PHP script like:
The script would look like:
The output would be:
Code: Select all
test.php?name=Ted&age=19Code: Select all
<?php
echo $_GET['name'];
Code: Select all
TedRe: php querystring
ok.. but say i have an id for a usser....and i want that id toappear in the URL... so a page becomes unique to each individual.... how do i do this?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php querystring
Moved to PHP-Code.
Re: php querystring
sorry that not make sense
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php querystring
What doesn't make sense?
Re: php querystring
all of it,.. im confused. can u write the code i should write?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php querystring
PCSpectra already did. It doesn't get any simpler than that. And reguardless, we arn't here to write the code for you. If you do not understand something you need to explain what you do not understand, and we will explain from there (and maybe a little code).