Jump to content

Archived

This topic is now archived and is closed to further replies.

tubs2222

URL

Recommended Posts

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

Share this post


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

Share this post


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


index.php:
[code]

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

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

?>
[/code]
[=

Share this post


Link to post
Share on other sites
[!--quoteo(post=355802:date=Mar 16 2006, 10:41 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 16 2006, 10:41 PM) [snapback]355802[/snapback][/div][div class=\'quotemain\'][!--quotec--]
index.php:
[code]

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

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

?>
[/code]
[=
[/quote]

Oh i c... thanks :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.