Jump to content


Photo

Help me, I am newb!


  • Please log in to reply
4 replies to this topic

#1 Eugene

Eugene
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts

Posted 14 March 2006 - 10:21 PM

I have looked everywhere and could not find it anywhere!

I want to know how do you do the

?id=

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

#2 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 14 March 2006 - 10:55 PM

Wow, where to begin...



#3 keeB

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

Posted 14 March 2006 - 11:11 PM

I WANT TO DO THE.. no wait :)


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

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

GOOD LUCK!

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


#4 Eugene

Eugene
  • Members
  • PipPipPip
  • Advanced Member
  • 126 posts

Posted 15 March 2006 - 01:10 AM

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.

#5 shortj75

shortj75
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 17 March 2006 - 12:31 PM

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

//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>

and here is your output page name it test.php

//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";
}
?>

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

//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";
}
?>

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
The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users