Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

N00b question again :)

Codes here !

Moderators: macek, egami, gesf

N00b question again :)

Postby 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
New php-forum User
 
Posts: 32
Joined: Tue Jan 28, 2003 10:19 am
Location: Québec

Postby 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.
User avatar
Joan Garnet
Moderator
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: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron