Re: Re: simple ?- load page after submit
| From: | John Nichel | Date: | Fri, 23 Jan 2004 20:00:52 +0000 |
| Subject: | Re: Re: simple ?- load page after submit | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175570@lists.php.net to get a copy of this message | ||
Matt Hedges wrote:
John, yes, it's from an auto incremement field in MySQL the id comes from a new db entry... i really appreciate your help, MattPlease reply to the group, and not just me. This way, other people who may have the same problem can find the answer in the archives. If it's from a new database entry, set your id right after you run your insert query. Something like.... if ( @mysql_query ( "INSERT....." ) ) { $id = @mysql_insert_id(); }
----- Original Message ----- From: "John Nichel" <jnichel@by-tor.com>-- By-Tor.com It's all about the Rush http://www.by-tor.comMatt Hedges wrote:idThat doesn't work... I think the problem may be because I don't have theentry?defined anywhere in the code (but it automatically writes it to MySQL).Huh? Is this from an auto increment field in MySQL...when a new user signs-up?When I put the code below, I get a "can't send header" error.You have to use the header() function BEFORE any output is sent to the browser...or you could buffer the output.I tried changing the echo to <a href="page.php?id=$id">page</a>, but the page brings up page.php?id= (id = nothing).Where is 'id' coming from? A form post? New db entry? Existing db