It's mysql_query($sql3) not mysql_result($sql3) - Jonathan
-----Original Message----- From: Matt Rudderham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Could you look at this PHP/MySQL Code? Hi, This is generating an error: Warning: Wrong parameter count for mysql_result() in /usr/local/www/html/matt/add.php on line 27 I can't figure out what the problem is, here is the code in question, it is part of an HTML form: <--Snip connect etc.. --> // process form $sql = "INSERT INTO members (first,last,position,organization,address,postal_code,county,phone,fax,e mail,website,member_type,on_directory,on_website,description,active,expi re_date) VALUES ('$first','$last','$position','$organization','$address','$postal_code', '$county','$phone','$fax','$email','$website', '$member_type','$on_directory','$on_website','$description','$active','$ expire_date')"; $result = mysql_query($sql); echo "Member Added\n"; $sql2 = "select max(member_id) from members"; $member_id = mysql_query($sql2); echo "$member_id"; $sql3 = "INSERT INTO skills (member_id, name, schooling, certifications, description) VALUES ('$member_id','$skill_name','$schooling','$certifications','$skill_descr iption')"; $result = mysql_result($sql3); echo "$result"; ?> Thanks very much Matt Rudderham "Bonum volens duceris in Tartarum" --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php