|
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
Question,
I have a form that I have created, it inserts data into a mysql database. After the insert form is submitted it goes to a process.php form that shoots off an email and displays the data that was entered on the form by <?php echo $CallDate; ?> But I cannot seem to get the auto incremented id to show on this page. So the question is How do you get the auto number created in the database to show after the process? It has to show after because two people may be entering data at the same time. Any would be so appreciated THANKS |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
..oO(eaw500)
> I have a form that I have created, it inserts data into a mysql database. >After the insert form is submitted it goes to a process.php form that shoots >off an email and displays the data that was entered on the form by <?php echo >$CallDate; ?> But I cannot seem to get the auto incremented id to show on this >page. So the question is How do you get the auto number created in the database >to show after the process? It has to show after because two people may be >entering data at the same time. Any would be so appreciated THANKS http://php.net/mysql_insert_id Micha |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
Thanks, But I need it to show the number that was created in the mysql
database, that script is not working. Does anyone else know how to show the auto number created in an insert form on the process page. Many people are entering in this form at the same time and I cann't use a look up script. Any would be great. |
|
|
|
#4 (permalink) |
|
Messages: n/a
Hébergeur: |
assign the mysql_insert_id to a variable and then echo that or attach it to a
url parameter, i use it like this $lastInsertNum=mysql_insert_id(); put that code right after the mysql_query code, then echo the variable on your page, or if you are redirecting after inserting attach it. header("Location: "next_Page.php?insertID=".$lastInsertNum); exit; |
|
![]() |
| Outils de la discussion | |
|
|