jeudi 26 mars 2015

SQL data record to HTML form

So I'm a real noob to SQL. I only just managed to get my head around sending data from a html form to a table in a database.... Please bear with me.


I have a very large form on which I have broken down into 6 sections for each user to fill out. The project I am working on is a career progression based website. It has sections called "About Me", "Employment History", "Education" etc.


The about me page is the first form a use will complete and it will generate a new user account number in the database under the "About Me" table.


I want to take that number and use it on all other forms for the same applicant behind the scenes. How can I do that?


I hope that question made sense and thanks in advance for any help you can offer me.


What I have tried so far is this:



<?php
$ApplicantNo = SELECT ApplicantNo from aboutme WHERE EmailAddress='$EmailAddress' AND Firstname='$FirstName';
<input type="hidden" name='ApplicantNo' value='" . $ApplicantNo . "'>"; ?>

Aucun commentaire:

Enregistrer un commentaire