Hi, I had this working before, and now it isn't... I don't know what I have done...
<form method="post" action="register.php">
<table border = 0>
<tr>
<td>Username: </td> <td> <input type="text" name="username" /></td> <td> Please choose a unique
username </td>
</tr>
<tr>
<td>Forename: </td> <td> <input type="text" name="forename" /></td>
</tr>
<tr>
<td>Surname: </td> <td> <input type="text" name="surname" /> </td>
</tr>
<tr>
<td>DOB: </td> <td> <input type="text" name="dob" /> </td> <td>Please enter in the form of
dd/mm/yyyy</td>
</tr>
<tr>
<td>Email: </td> <td> <input type="text" name="email" /> </td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td>House Number: </td> <td> <input type="text" name="housenumber" /> </td>
</tr>
<tr>
<td>Street: </td> <td> <input type="text" name="street" /> </td>
</tr>
<tr>
<td>Town: </td> <td> <input type="text" name="town" /> </td>
</tr>
<tr>
<td>Postcode: </td> <td> <input type="text" name="postcode" /> </td><td> enter in the form of LL99
9LL </td>
</tr>
<tr>
<td> <input type="submit"></td> <td> </td>
</tr>
</form>
and the php file.
<?php
$username= $_POST ['username'];
$forename = $_POST ['forename'];
$surname = $_POST ['surname'];
$dob = $_POST ['dob'];
$email = $_POST ['email'];
$conn=odbc_connect('db09','','');
$sql="INSERT INTO tblCustomer (username, Surname, Forename, DOB, [Email Address]) VALUES
('$username', '$surname','$forename', '$dob','$email')";
if (odbc_exec($conn,$sql)) {
echo "Record added";
}
odbc_close($conn);
?>
I did move the database but I changed the DSN. Also, with the other fields in the table, can I put them into another table in the same access database?
And lastly, If i wanted to put that php into an area of an html page, can you just ut it into a <div> ?
Thankl you for your help 🙂