Hello Sleidia,
I have the same problem that you r talking about so please can u tell me if you solved your problem.
I read the link you provided but it worked in sedning the data to a script instead of redirecting the browser to the script and displaying a normal page.
I hope that you can help...
To get the last inserted id of a table
<?php
$result = mysql_query("select last_insert_id() as lastid");
$lastid = mysql_result($result,0);
?>
this script should be run directly after inserting the new row in the first table, cause it retrieves the last autoincremented id of the...
did u try to use the following statement after inserting the new customer.
$result = mysql_query("select last_insert_id() as lastid");
$lastid = mysql_result($result,0)
this will return the last id inserted by the connection that you are using.
you can use the header() function to do this
if ($bol==1){
header("location:yes.php");
}
be careful that u use this before outputing anything to the browser, because this function is used in the header section.
you can take the result into a script where u test the $action variable and depending on this, u redirect to the appropriate page
redirect.php
<?php
switch ($action){
case someaction:
header("location:http://www.yourdomain.com/someaction.php ");
break;
case anotheraction...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.