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,
Matt

Please 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" <[EMAIL PROTECTED]>
Matt Hedges wrote:


That doesn't work... I think the problem may be because I don't have the

id


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

entry?

-- By-Tor.com It's all about the Rush http://www.by-tor.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to