Joey46 Posted March 7, 2009 Share Posted March 7, 2009 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 More sharing options...
jeffman Posted March 7, 2009 Share Posted March 7, 2009 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 More sharing options...
Joey46 Posted March 7, 2009 Author Share Posted March 7, 2009 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 More sharing options...
jeffman Posted March 7, 2009 Share Posted March 7, 2009 Link to comment Share on other sites More sharing options...
Joey46 Posted March 7, 2009 Author Share Posted March 7, 2009 No suggestions? Thank you anyway it has me beat what the problem is also Link to comment Share on other sites More sharing options...
Synook Posted March 7, 2009 Share Posted March 7, 2009 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 More sharing options...
Joey46 Posted March 7, 2009 Author Share Posted March 7, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.