RE: [PHP] global var.
| From: | Jon Haworth | Date: | Tue, 01 Apr 2003 00:59:08 +0000 |
| Subject: | RE: [PHP] global var. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141763@lists.php.net to get a copy of this message | ||
Hi Sebastian,
> $variable = $id;
> // some other stuff....
> @mysql_query here....
> $id = mysql_insert_id();
>
> How do I get $id from insert_id() to pass to $variable
> above? Hard to explain the situation i am in, but the
> query has to be below $variable
::blink::
Perhaps something like:
$loc = $PHP_SELF. "?variable=". $id;
header("Location:". $loc);
You'd have to put something in to stop an infinte loop though.
Cheers
Jon