I’m following a tutorial on inserting into a MySQL database the inital page loads up fine but when I submit I get a HTTP error 405.
This is my code:
[code]
<?php if ($submit) { // process form $db = mysql_connect("localhost", "root"); mysql_select_db("test",$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 ?>First name:
Last name:
Address:
Position:
Has anyone got a any suggestions, I think the code is fine, because I’ve directly copied it out of the tutorial.
Something isn’t set up right, thinks I…
Jade.