Help!
Trying to update a table in my first script, using mysql.
This is script.
<?php
if($submit){
//process form
$db=mysql_connect("localhost","user","password");
//mysql_select_db("mydb1",$db);
$sql="INSERT INTO employees(first,last,address,position)VALUES
($first,'$last','$address','$position');";
$result=mysql_query($sql);
echo "Thank You! Information entered.\n";
}else{
//display form
?>
<form method="post"action="<?php echo $PHP_SELF?>">
First Name:<input type="Text"name="first"><br>
Last Name:<input type="Text"name="last"><br>
Address:<input type="Text"name="address"><br>
Position:<input type="Text"name="position"><br>
<input type="Submit"name="submit"value="Enter Information">
</form>
<?php
}//end if
?>
Can someone tell me where the problem is?!
Thanks.🙂