I am trying to create a signup page, at first when i was having 4 columns in database table, i din hav a prob… but now when i added extra columns to suit my requirements… its not working
[hr]This is my “signup.php” code[hr]
[php]
<?php include_once("db.php") ?> <?php $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $rollno = $_POST['roll']; $username = $_POST['name']; $password = $_POST['pass']; $date = $_POST['date']; $phone = $_POST['phone']; $email = $_POST['email']; $sql = "INSERT into login values('".$firstname."','".$lastname."',".$rollno.",'".$username."','".$password."','".$date."',".$phone.",'".$email."')"; $qury = mysql_query($sql); if(!$qury) echo "failed".mysql_error(); else{ echo "successful";} ?>[/php]
[hr]This is my “Signupform.php” code[hr]
[php]
Create
[hr]This is my Database table[hr]
| ID | firstname | lastname | rollno | username | password | date | phone | email | mark |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
[hr]This is my error[hr]
“Column count doesn’t match value count at row 1” ---------- Please help me fix this problem
is that necessary to post al the columns in the database? cuz “mark” column i am using here is to store user’s mark from “quiz.php” page, which is a different page. Will it create any problem???
Thank you in advance please help me solve this problem, i am just a beginner…