Anyone can help me, why this code works like if the submit button is not working?.
Thanks for your help:
<?php;
if ($acepta)
{
$db = mysql_connect("localhost","root","");
mysql_select_db("learndb",$db);
$sql = "insert into personnel (firstname,lastname,nick,email,salary)";
$sql = $sql ." values ($first,$last,$nickname,$email,$salary);";
echo $sql ;
echo "<br><br>";
echo '$first';
$result = mysql_query($sql) ;
echo "Informacion ha sido guardada." ;
}
else
{
?>
<form method="post" action="input.php">
Nombre: <input type= "Text" name="first"><br>
Apellido: <input type="Text" name="last"><br>
Nickname: <input type="Text" name="nickname"><br>
E-Mail:<input type="text" name="email"><br>
Sueldo:<input type="text"name="salary"><br>
<input type="SUBMIT" name="acepta" value="Enter Info">
</form>
<?}
?>