I keep getting this php error when tryin to insert data into my access database?

Jay

New member
heres my code for the form page
<html>
<body>

<form action="MemberInput.php" method="post">
First Name: <input type="text" name="fname" />
Last Name: <input type="text" name="lname" />
User Name: <input type="text" name="Uname" />
Password: <input type="text" name="Pword" />
Email: <input type="text" name="Email" />
<input type="submit" />
</form>

</body>
</html>


thats my code for the php file
<html>

<body>


<?php

//STORAGE PHASE

$FirstName = $_POST["Fname"];
$LastName = $_POST["Lname"];
$PassWord = $_POST["Pword"];
$Email = $_POST["Email"];
$UserName = $_GET["Uname"];

//CONNECTION PHASE

$conn=odbc_connect('UsedCars','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}

//IF SUBMIT BUTTON IS CLICKED

if ($_POST['Submit'])
{
//QUERY CREATION

$InsertQ = "INSERT INTO tblMembers (Fname, Lname, Pword, Email, Uname) VALUES ('$FirstName, $LastName, $PassWord, $Email, $UserName')"
$QExecute = odbc_do($connectionString, $InsertQ);

//CLOSING CONNECTION

odbc_close($conn);

}
?>

</body>
</html>
 
Back
Top