Hi Andrea, > I am really new at PHP & MySQL, so please bear with me.
welcome to our happy band... > I am using the mysql_insert_id function but continually receive an error, > and hoping someone can point me in the right direction to resolve this. > > My error: > Warning: Supplied argument is not a valid MySQL-Link resource on line 44 > _________________________________________ > $result = mysql_query("insert into support (ref_number, date_time, name, > location, email, subject, problem, priority_1, > priority_2, priority_3, priority_4) values ('null', '$date', '$name', > '$email', '$location', '$subject', '$problem', > '$priority_1', '$priority_2', '$priority_3', '$priority_4')"); > > $ref_number = mysql_insert_id($link_id); ========> This is line 44 > ____________________________________________ > Any suggestions? The auto_num field in the database is updating and > everything else is working fine.... Either remove $link_id and go with the default, or make sure that $link_id is the same variable as assigned in the mysql_connect() or mysql_pconnect() call - these being the functions that establish/name the link. Regards, =dn --------------------------------------------------------------------- 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