Jump to content

1 Last Problem With Php Script


Joey46

Recommended Posts

this is the problem i am getting with this last script Not Working! Unknown column 'PostalAddress' in 'field list' This is the script$ID =$_POST['ID'];$Name =$_POST['Name'];$Password =$_POST['Password'];$Email =$_POST['Email'];$PostalAddress =$_POST['PostalAddress'];$PhoneNumber =$_POST['PhoneNumber'];$sql = "INSERT into students (ID, Name, Password, Email, PostalAddress, PhoneNumber ) values ('$ID', '$Name', '$Password', '$Email', '$PostalAddress', '$PhoneNumber')"; if(mysql_query($sql, $conn)){ echo "<h4> Student Added! </h4>"; } else { echo "<h4> Not Working! </h4>"; echo mysql_error(); } ?>I have been working on this one since yesterday and still can not work out why i am recieving this error could someone please help meThank you in adavance

Link to comment
Share on other sites

You have a connection, the table exists, the columns you named before that one exist, and this has nothing to do with the values you're passing into the table. You can be sure of all that.Since everything else is working, I can only imagine that there is no field by the name PostalAddress, or that you are misspelling the name.Double-check the table with your MySql administration program.

Link to comment
Share on other sites

You have a connection, the table exists, the columns you named before that one exist, and this has nothing to do with the values you're passing into the table. You can be sure of all that.Since everything else is working, I can only imagine that there is no field by the name PostalAddress, or that you are misspelling the name.Double-check the table with your MySql administration program.
I just did a double check with mysql database and it is written in there the same as my script :)
Link to comment
Share on other sites

Modify the script that you think is running in some way, e.g. just make it echo "Really not working", and check whether the script you just changed is actually the one running.

Link to comment
Share on other sites

Modify the script that you think is running in some way, e.g. just make it echo "Really not working", and check whether the script you just changed is actually the one running.
Thanks buddy that problem is fixed
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...