Jump to content


Photo

URL


  • Please log in to reply
4 replies to this topic

#1 tubs2222

tubs2222
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 17 March 2006 - 01:44 AM

Hey PHPFreak members

I have a question reguarding the URL of a page. On some site I see a url like "index.php?id=232" I already know an alternative way of doing this, but i think it would be better if it had the ?id=.

Thanks

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 March 2006 - 02:00 AM

[!--quoteo(post=355777:date=Mar 16 2006, 08:44 PM:name=tubs2222)--][div class=\'quotetop\']QUOTE(tubs2222 @ Mar 16 2006, 08:44 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]I have a question ...[/quote]
OK, what's your question?

Legend has it that reading the manual never killed anyone.
My site

#3 tubs2222

tubs2222
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 17 March 2006 - 02:04 AM

how do u make it so that a url turns into this "index.php?id=232"

#4 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 17 March 2006 - 03:41 AM

[!--quoteo(post=355785:date=Mar 17 2006, 02:04 AM:name=tubs2222)--][div class=\'quotetop\']QUOTE(tubs2222 @ Mar 17 2006, 02:04 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
how do u make it so that a url turns into this "index.php?id=232"
[/quote]


index.php:

<a href="index.php?id=10">click me</a>
<?php

if ( $_GET['id'] ) {
    print "<br><br>You said the ID was $id";
}

?>
[=

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/


#5 tubs2222

tubs2222
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 17 March 2006 - 06:32 AM

[!--quoteo(post=355802:date=Mar 16 2006, 10:41 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 16 2006, 10:41 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
index.php:

<a href="index.php?id=10">click me</a>
<?php

if ( $_GET['id'] ) {
    print "<br><br>You said the ID was $id";
}

?>
[=
[/quote]

Oh i c... thanks :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users