Here is my code so far, and thanks in advance:
<html>
<head>
<title>Insert</title>
</head>
<!--What is inserted will be posted and the person
will be forwarded to sql.php"-->
<form method="post" action="sql.php">
<center>
<p><strong> Your name?</strong> <input type="text" name="Name"/> </p>
<p><strong> Your age?</strong> <input type="text" name="Age"/> </p>
<p><strong> Your height?</strong> <input type="text" name="Height"/> </p>
<p><input type="submit" value="Insert"/> </p>
</center>
</form>
</html>
<center>
Code: Select all
<?php
//Have to make it so all fields must be complete in order to submit.
$Name = $_POST['Name'];
$Age = (int) $_POST['Age'];
$Height = (double) $_POST['Height'];
$pos = strpos($Name, $Age, $Height);
if ($pos === false)
echo "Please fill the fields";
?></html>