PHP question..

dezell123

Banned
Dec 14, 2000
554
0
0
I wanna make a website in PHP. I want to recieve a query and show it on my page. I want to use the query's autoInc number and use it on my URL....like this test.php?ID=(autoincnumberhere)...how would I do this? you guys know what I mean,right? Is there a section in the PHP doc that teaches me how to do this? If so,tell me,becuase I cant find it..

thank you so much to anybody who can help me!
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
Simple.

1. Create a table in mysql that has auto incriment and is primary. (best to use a php tool called PHPMyAdmin)

2. Write something in the other fields

3. Query the table and show the results with links to yourpage.php?id=$result["id"]

4. Then in yourpage.php do
if(isset($id)) {
$result=mysql_query("select * from table where id=$id");
print($rest of the stof frum the results);
}


there is a few things missing like connecting to the database and all that, but you get the idea
 

dcpsoguy

Diamond Member
Nov 5, 2000
3,252
0
0
Czar, I get everything expcept for the isset code? what does that mean?

Thanks so much!
 

Czar

Lifer
Oct 9, 1999
28,510
0
0
isset is just that if the varible has not been set it sets it with no value. With php for iis and I think the newewst php version it gives you a error message.. pain in the ass :)