N00b question again :)

Codes here !

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 32
Joined: Tue Jan 28, 2003 10:19 am
Location: Québec

Fri Jan 31, 2003 11:52 am

I have a form that displays the information in a DB according to the ID number put in a text field...

but how do I check in the DB to see is there's a reccord with that ID ?

User avatar
Joan Garnet
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Sat Feb 01, 2003 7:07 am

use something like this:

Code: Select all

$sql = "SELECT user_id, username FROM ".$table." where user_id=".$HTTP_POST_VARS["id"];

where $HTTP_POST_VARS["id"] comes form the form sent via POST method.

Post Reply