So: I decided to make a simple form which will echo back name, phone, email.
This is the HTML code for the form called Index.html:
Code: Select all
<html><head> <title>TEST DATABASE</title> </head> <body><h1> TEST DATABASE </h1> <form method="post" action="../php/sql_insert.php" > <label for = "name"> Your Name </label><input type="text" name="name"> <br /><label for = "email"> Your E-mail : </label><input type="text" name="email"><br /><label for = "phone"> Phone number : </label><input type="text" name="phone"><br /> <br /><input type="submit" value="Send"><input type="reset" value="Clear"> </form> </body></html> Code: Select all
<html><head><title> Output </title></head><body><h1> Thank You </h1> Code: Select all
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
echo 'Thanks for submitting your feedback';
echo 'Your name is'. $name;
echo 'Your email address is'. $email;
echo 'Your Phone Number is'. $phone;
?>
Code: Select all
</body></html> The result is all I get after I input data on the form is the heading "Thank You" and that's it.
What am I doing wrong?
About to start opening my veins here.