Codes here !
Moderators: macek, egami, gesf
by border20 » 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 ?
-
border20
- New php-forum User

-
- Posts: 32
- Joined: Tue Jan 28, 2003 10:19 am
- Location: Québec
by Joan Garnet » Sat Feb 01, 2003 7:07 am
ok,
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.
-

Joan Garnet
- Moderator

-
- Posts: 387
- Joined: Sat Aug 03, 2002 2:56 am
- Location: Mars
-
Return to mySQL & php coding
Who is online
Users browsing this forum: No registered users and 1 guest