RE: [PHP-DB] Insert and Update on same page

2004-11-01 Thread Bastien Koert
ROTECTED]> To: <[EMAIL PROTECTED]> Subject: [PHP-DB] Insert and Update on same page Date: Mon, 1 Nov 2004 14:00:29 -0600 I've got a problem with trying to insert and updating on the same page. Here is my problem: I have a form that the user fills out. Upon submission, I want the informa

Re: [PHP-DB] Insert and Update on same page

2004-11-01 Thread Micah Stevens
You didn't mention which database you're working with, so I'll assume mysql. In a word, yes, this is possible, just do it in sequence. pseudo-code: mysql_query("insert blah blah"); $id = mysql_insert_id(); $data = mysql_fetch_assoc(mysql_query("select * from table where id = $id")); $uniqueID =

[PHP-DB] Insert and Update on same page

2004-11-01 Thread Bomgardner, Mark A
I've got a problem with trying to insert and updating on the same page. Here is my problem: I have a form that the user fills out. Upon submission, I want the information that was just inserted, to be pulled back out and shows to the user with an unique number for that record other than the re