Jump to content

Archived

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

Eugene

Help me, I am newb!

Recommended Posts

I have looked everywhere and could not find it anywhere!

I want to know how do you do the

[code]?id=[/code]

Please tell me!

Also, how can i Make it like random, for example:

?id=42

then i add something else via website home and it turns

?id=43

Share this post


Link to post
Share on other sites
I WANT TO DO THE.. no wait :)


[code]
<?
print $_GET['id'];
?>
[/code]

Save that as index.php, and go index.php?id=38092.

GOOD LUCK!

Share this post


Link to post
Share on other sites
Wow that actually works!

How can I make it an actual page though instead of an id thing, like when i go to for example index?id=8249

It will display an id instead of the id number.

Share this post


Link to post
Share on other sites
this is how you can have a page display (you can have 1 page display like as many different pages as you want by ?id= i will show you below
here is you link on the first page

[code]
//here are your links just copy and past them to a page
<a href=test.php?id=3145>testlink1</a> <a href=test.php?id=3146>testlink2</a> <a href=test.php?id=3147>testlink3</a>[/code]

and here is your output page name it test.php

[code]
//test.php
<?error_reporting(E_ERROR);
if($_GET['id']==3145){
print "Hello Everyone";
}
if($_GET['id']==3146){
print "Good bye cruel world";
}
if($_GET['id']==3146){
print "cool it really works";
}
?>
[/code]

or you canput the links on the same page to display something different for each choice(same name test.php)

[code]
//test.php
<a href=test.php?id=3145>testlink1</a> <a href=test.php?id=3146>testlink2</a> <a href=test.php?id=3147>testlink3</a><BR>
<?error_reporting(E_ERROR);
if($_GET['id']==3145){
print "<body bgcolor=red>Hello Everyone";
}
if($_GET['id']==3146){
print "Good bye cruel world";
}
if($_GET['id']==3147){
print "<body bgcolor=blue>cool it really works";
}
?>
[/code]

with this little script you can make your visitors think they are going to many different pages when they really only going to one
i hope this helps answer your question

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.