Hi, I am getting error in Data insert. following is th code.
Database name is : stores
table name: emp_registration
Fields are : id (Primary Key & Auto increment), firstname(varchar),
middlename(varchar),
lastname(varchar),
username(varchar),
password(varchar),
email(varchar),
contact(varchar),
sem(varchar),
enrollmentno(varchar),
status(varchar)
<?php
include "connection.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Employee Registration Form | SMS </title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="css/custom.min.css" rel="stylesheet">
</head>
<br>
<div class="col-lg-12 text-center ">
<h1 style="font-family:Lucida Console">Stores Management System</h1>
</div>
<body class="login" style="margin-top: -20px;">
<div class="login_wrapper">
<section class="login_content" style="margin-top: -40px;">
<form name="form1" method="post" action="">
<h2>User Registration Form</h2><br>
<div>
<input type="text" class="form-control" placeholder="FirstName" name="firstname" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="MiddleName" name="middlename" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="LastName" name="lastname" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="Username" name="username" required/>
</div>
<div>
<input type="password" class="form-control" placeholder="Password" name="password" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="email" name="email" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="contact" name="contact" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="SEM" name="sem" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="Enrollment No" name="enrollmentno" required/>
</div>
<div class="col-lg-12 col-lg-push-3">
<input class="btn btn-default submit" type="submit" name="submit1" value="Register">
</div>
</form>
</section>
<?php
if(isset($_POST['submit1']))
{
$qry=mysqli_query($link,"insert into emp_registration values('','$_POST[firstname]','$_POST[middlename]','$_POST[lastname]','$_POST[username]','$_POST[password]','$_POST','$_POST[contact]','$_POST[sem]','$_POST[enrollmentno]','No')"); ?> <div class="alert alert-success col-lg-12 col-lg-push-0"> Registration successfully, You will get email when your account is approved </div> <?php } ?> </div> </body> </html> After filling all fields data cannot insert but registration sucessfully msg comes. please help me what anything going wrong. my Whatsapp no : +91 9327823000 : +91 9727731765 Please suggest or contact on above number
Database name is : stores
table name: emp_registration
Fields are : id (Primary Key & Auto increment), firstname(varchar),
middlename(varchar),
lastname(varchar),
username(varchar),
password(varchar),
email(varchar),
contact(varchar),
sem(varchar),
enrollmentno(varchar),
status(varchar)
<?php
include "connection.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Employee Registration Form | SMS </title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="css/custom.min.css" rel="stylesheet">
</head>
<br>
<div class="col-lg-12 text-center ">
<h1 style="font-family:Lucida Console">Stores Management System</h1>
</div>
<body class="login" style="margin-top: -20px;">
<div class="login_wrapper">
<section class="login_content" style="margin-top: -40px;">
<form name="form1" method="post" action="">
<h2>User Registration Form</h2><br>
<div>
<input type="text" class="form-control" placeholder="FirstName" name="firstname" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="MiddleName" name="middlename" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="LastName" name="lastname" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="Username" name="username" required/>
</div>
<div>
<input type="password" class="form-control" placeholder="Password" name="password" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="email" name="email" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="contact" name="contact" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="SEM" name="sem" required/>
</div>
<div>
<input type="text" class="form-control" placeholder="Enrollment No" name="enrollmentno" required/>
</div>
<div class="col-lg-12 col-lg-push-3">
<input class="btn btn-default submit" type="submit" name="submit1" value="Register">
</div>
</form>
</section>
<?php
if(isset($_POST['submit1']))
{
$qry=mysqli_query($link,"insert into emp_registration values('','$_POST[firstname]','$_POST[middlename]','$_POST[lastname]','$_POST[username]','$_POST[password]','$_POST','$_POST[contact]','$_POST[sem]','$_POST[enrollmentno]','No')"); ?> <div class="alert alert-success col-lg-12 col-lg-push-0"> Registration successfully, You will get email when your account is approved </div> <?php } ?> </div> </body> </html> After filling all fields data cannot insert but registration sucessfully msg comes. please help me what anything going wrong. my Whatsapp no : +91 9327823000 : +91 9727731765 Please suggest or contact on above number