Re: howto get PK id after INSERT??

From: Date: Tue, 20 Jul 2004 12:01:14 +0000
Subject: Re: howto get PK id after INSERT??
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35404@lists.php.net to get a copy of this message
On Tuesday 20 July 2004 19:49, Vincent Jordan wrote: > I think I got it correct got the most part. I am having a problem with > the urlencode function I believe. > > On page CustomerAddNew1.php ( page than handles form data ) im using: > > $last_id = mysql_query("SELECT LAST_INSERT_ID() from customerinfo"); mysql_query() returns a "resource id". > $last_id = urlencode ($last_id); > header("Location: UserMain.php?custid='$last_id'"); So the above is meaningless. Please check the previous responses where you have been pointed to a more appropriate function to use. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db ------------------------------------------ /* It's multiple choice time... What is FORTRAN? a: Between thre and fiv tran. b: What two computers engage in before they interface. c: Ridiculous. */

« previous php.db (#35404) next »