Jump to content

Unknown column 'student_id' in 'field list'


ipsa24

Recommended Posts

$student_id = $_POST['st_id'];

$student_pass = $_POST['st_pass'];

$first_name = $_POST['first_name'];

$last_name = $_POST['last_name'];

$gender = $_POST['gender'];

$contact_no = $_POST['contact_no'];

$qualification= $_POST['qualification'];

$city = $_POST['city'];

$state = $_POST['state'];

$country = $_POST['country'];

$pin_code = $_POST['pin_code'];

$email1 = $_POST['email1'];

$address = $_POST['address'];

$resumename = "";

$imagename = "";

$dobdate = date("Y-m-d",strtotime($_POST['dob']));

$select_query="select student_id from student_registration where student_id = '$student_id'";

 

Error : Unknown column 'student_id' in 'field list'

Link to comment
Share on other sites

Unknown column 'student_id' in 'field list'

 

$student_id = $_POST['st_id'];

$student_pass = $_POST['st_pass'];

$first_name = $_POST['first_name'];

$last_name = $_POST['last_name'];

$gender = $_POST['gender'];

$contact_no = $_POST['contact_no'];

$qualification= $_POST['qualification'];

$city = $_POST['city'];

$state = $_POST['state'];

$country = $_POST['country'];

$pin_code = $_POST['pin_code'];

$email1 = $_POST['email1'];

$address = $_POST['address'];

$resumename = "";

$imagename = "";

$dobdate = date("Y-m-d",strtotime($_POST['dob']));

$select_query="select student_id from student_registration where student_id = '$student_id'";

 

Error : Unknown column 'student_id' in 'field list'

 

It's thing like this that make me feel good about myself.

Link to comment
Share on other sites

ipsa24: Check your table structure again, and you'll see what the problem is.

In fact, it's so basic you should have done this immediately upon seeing that error, without us having to tell you. If you want people to help you, you have to put in some effort to solve the problem yourself. After all, why should we bother to spend our time (which often is very limited) to help you, when you can't be bothered to do so yourself?

Link to comment
Share on other sites

I hope you are checking if these post variables are set before actually assigning them to another variable, and that you are sanitizing them before using them against the database.

 

With that said, ChristrianF told you to pretty much what there is to be said. The error message speaks for itself.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.