[RESOLVED] error: undefined index?
I get an undefined index on 'family_id' in this last line of this code. Any ideas as to why?
$sql3 = 'SELECT `family_id` FROM `Family` WHERE `family_name` = \''. $_POST['family_name'] .'\' and `f_pass` = \''. $f_pass .'\' LIMIT 1';
$result = @mysql_query($sql3);
$row = mysql_fetch_row($result);
$fam_id = $row['family_id'];
$result = mysql_query($sql3) or die(mysql_error());
See what you get.
Also mysql_real_escape_string($_POST['family_name']) or mysql_escape_string (if you are using an older version of php)
try removing the single quotes around family_id in the select statement, and using mysql_fetch_assoc($result)
removing the quotes did it. I didn't realize that made any difference, but thanks!
Hmm.. Oh fricken magic quotes...
Last edited by ellisgl; 08-16-2007 at 04:59 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)