Jump to content

Selecting an individual field


son.of.the.morning

Recommended Posts

I want the user to input there name, then have a php script to find the memeber in a members database and then grab the whole row by the user name.

 

so if my db has 3 colums id, user, password, then want it to take out all three fields based on the users name.

 

Can anyone help me?

Link to comment
https://forums.phpfreaks.com/topic/213512-selecting-an-individual-field/
Share on other sites

$result = mysql_query("SELECT * FROM "TABLE" WHERE username = '".$_POST['username_txt']."'");

 

$row = mysql_fetch_array($result);

 

echo $row['username'];

 

username_txt = the name of the text box the user entered data into.

username = the username column in the database

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.