PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > macromedia.dyna.html > Mysql Autonumber
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Mysql Autonumber

Réponse
 
LinkBack Outils de la discussion
Vieux 28/02/2008, 01h58   #1 (permalink)
eaw500
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Mysql Autonumber

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

  Réponse avec citation
Vieux 28/02/2008, 02h07   #2 (permalink)
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Mysql Autonumber

..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
  Réponse avec citation
Vieux 28/02/2008, 21h06   #3 (permalink)
eaw500
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Mysql Autonumber

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.

  Réponse avec citation
Vieux 02/03/2008, 06h38   #4 (permalink)
MikeL7
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Mysql Autonumber

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;



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h32.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,52679 seconds with 12 queries