properly run on local server but that’s on running properly on main server… So, any body help me what’s a Error in my code.
`user_id`, `username`, `password`, `cpassword`, `email`, `candidate_name`, `dob`, `sex`, `contact_no`, `current_add1`, `current_add2`, `permanent_add1`, `permanent_add2`, `pin_code`, `city`, `state`, `country`, `lqualify`, `specialization`, `univer_school`, `diploma_degree`, `a_line1_diplo_dgre`, `a_line2_diplo_dgre`, `b_line1_diplo_dgre`, `b_line2_diplo_dgre`, `c_line1_diplo_dgre`, `c_line2_diplo_dgre`, `location`, `project_title`, `pro_details`, `training`, `t_member`, `duration`, `industry`, `year`, `months`, `designation`, `l_industry`, `key_skills`, `roles`, `company_name`, `1ccname`, `2ccname`, `3ccname`, `photourl`, `resumeurl`, `summary`SELECT * FROM `site_user_details` WHERE 1
<?php
//Start session
if(isset($_POST['submit'])) {
* * // Get the ID
* * * **
//Include database connection details
require_once('config.php');
//Connect to mysql server
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
die('Failed to connect to server: ' . mysql_error());
}
//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
die("Unable to select database");
}
//Sanitize the POST values
$candidate_name=$_POST['candidate_name'];
$dob = $_POST['dob'];
$sex = $_POST['sex'];
$contact_no = $_POST['contact_no'];
$email = $_POST['email'];
$current_add1 = $_POST['current_add1'];
$current_add2 = $_POST['current_add2'];
$permanent_add1 = $_POST['permanent_add1'];
$permanent_add2 = $_POST['permanent_add2'];
$state = $_POST['state'];
$country = $_POST['country'];
$lqualify = $_POST['lqualify'];
$univer_school = $_POST['univer_school'];
$diploma_degree = $_POST['diploma_degree'];
$a_line1_diplo_dgre = $_POST['a_line1_diplo_dgre'];
$a_line2_diplo_dgre = $_POST['a_line2_diplo_dgre'];
$b_line1_diplo_dgre = $_POST['b_line1_diplo_dgre'];
$b_line2_diplo_dgre = $_POST['b_line2_diplo_dgre'];
$c_line1_diplo_dgre = $_POST['c_line1_diplo_dgre'];
$c_line2_diplo_dgre = $_POST['c_line2_diplo_dgre'];
$project_title=$_POST['project_title'];
$pro_details=$_POST['pro_details'];
$training=$_POST['training'];
$t_member=$_POST['t_member'];
$duration=$_POST['duration'];
$industry=$_POST['industry'];
$year=$_POST['year'];
$months=$_POST['months'];
$designation=$_POST['designation'];
$l_industry=$_POST['l_industry'];
$key_skills=$_POST['key_skills'];
$roles=$_POST['roles'];
$qry = "INSERT INTO site_user_details(candidate_name,dob,sex,contact_no,email,current_add1,current_add2,permanent_add1,permanent_add2,state,country,lqualify,univer_school,diploma_degree,a_line1_diplo_dgre,a_line2_diplo_dgre,b_line1_diplo_dgre,b_line2_diplo_dgre,c_line1_diplo_dgre,c_line2_diplo_dgre,project_title,pro_details,training,t_member,duration,industry,year,months,designation,l_industry,key_skills,roles)
*VALUES('$candidate_name','$dob','$sex','$contact_no','$email','$current_add1','$current_add2','$permanent_add1','$permanent_add2','$state','$country','$lqualify','$univer_school','$diploma_degree',
'$a_line1_diplo_dgre','$a_line2_diplo_dgre','$b_line1_diplo_dgre','$b_line2_diplo_dgre','$c_line1_diplo_dgre','$c_line2_diplo_dgre','$project_title','$pro_details','$training','$t_member','$duration','$industry','$year','$months','$designation','$l_industry','$key_skills','$roles')";
$result = @mysql_query($qry);
//Check whether the query was successful or not
if($result) {
echo "<script>alert('Submission successfully!!!'); window.location = './fillform.php';</script>";
exit();
}else {
die("Query failed");
}
}
?>
<?php
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PASSWORD','');
define('DB_DATABASE','web214-arun');
?>