I am at a point where my form is connecting with the DB and inserting but it isn't taking my form data and inserting blank fields.
<form method="post" action="add.php">
<input type="text" name="firstname" placeholder="Firstname" id="firstname"><br><br>
<input type="text" name="lastname" placeholder="Lastname" id="lastname"><br><br>
<input type="submit" name="submit" value="Sent">
</form>
Here is the add.php script:
<?
mysql_connect("localhost","******","******");//database connection
mysql_select_db("testrentals");
//inserting data order
$order = "INSERT INTO customers (firstname, lastname) VALUES ('$firstname', '$lastname')";
//declare in the order variable
$result = mysql_query($order); //order executes
if($result){
echo("<br>Input data is workin and adding!");
} else{
echo("<br>Input data is failing =(");
}
?>
My database table has and id, firstname and last and joined date.
But as mentioned above, when submitted it states it is working and a record appears but nothing in the firstname or lastname field (I have yet to do the joined date part.)