Getting data from a single row...

Codes here !

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 193
Joined: Sat Mar 29, 2003 11:57 pm
Location: Auckland, New Zealand

Thu Jul 10, 2003 3:33 am

Your problem lies in your mysql query. I haven't used the extract function before, I usually use

$data = mysql_fetch_array($result);

But anyway, you have a "WHERE mobiel='0648938052'" but you have not selected this field. This is what you need to have.

Code: Select all

SELECT userid, mobiel FROM table WHERE mobiel='0648938052'

Then if you used mysql_fetch array you can print the user id for that mobiel (do you mean mobile?) like this

Code: Select all

echo $data["userid"];

Post Reply