Ok, this seems trivial, but since I'm a newbie when it comes to PHP, I've hit a brick wall trying to figure this out...
I want to look up "user_id" from a table and assign it to the variable $user_id. I keep getting an undefined index notice and I need it to be defined! 😃
$query = "SELECT user_id FROM users WHERE last_name = '{$last_name}'";
if(!($result = @mysql_query($query, $connection)))
showerror();
$row = mysql_fetch_row($result);
$user_id = $row[user_id];
Thanks!
Tim