Witam, od wczoraj męczę się z dość dziwnym problemem, mianowicie dane z formularza nie zapisują się w bazie danych..
Wyskakuję następujący błąd :
Error: insert into prequest(name,kod,miejscowosc,ulica,telefon,kwota,porat,mata,pas,system,wplata,practi,forma,gold,stat,siler,tablet,lozko,rodzaj,prelegent,multi,turbo,asystent,wyciskarka,kierowca,query,posting_date) values('awfwaf','awfawf','awfaw','awfawfawf','ffawf','fawf','fawf','Website Design & Development','','','','','','','','','','awf','awf','','wfaw','fawfa','fawfa','fawf','awfawf','awfawf','')
Kod php:
<?php
session_start();
include("dbconnection.php");
include("checklogin.php");
check_login();
error_reporting(0);
if(isset($_POST['submit']))
{
$name=$_POST['nie'];
$kod=$_POST['email'];
$miejscowosc=$_POST['dlaczego'];
$ulica=$_POST['poco'];
$telefon=$_POST['cos_tam'];
$kwota=$_POST['cos_tam1'];
$porat=$_POST['cos_tam2'];
$mata=$_POST['wdnd'];
$pas=$_POST['seo'];
$system=$_POST['swd'];
$wplata=$_POST['fwd'];
$practi=$_POST['whs'];
$forma=$_POST['ed'];
$gold=$_POST['opi'];
$stat=$_POST['dba'];
$silver=$_POST['nd'];
$tablet=$_POST['cms'];
$lozko=$_POST['smo'];
$rodzaj=$_POST['dwd'];
$prelegent=$_POST['dr'];
$multi=$_POST['wm'];
$turbo=$_POST['wta'];
$asystent=$_POST['ld'];
$wyciskarka=$_POST['osc'];
$kierowca=$_POST['other'];
$query=$_POST['query'];
$con=mysqli_connect("localhost", "root", "", "crm");
if(mysqli_connect_errno()){
echo "Connection Fail".mysqli_connect_error();
}
$sql = ("insert into prequest(name,kod,miejscowosc,ulica,telefon,kwota,porat,mata,pas,system,wplata,practi,forma,gold,stat,siler,tablet,lozko,rodzaj,prelegent,multi,turbo,asystent,wyciskarka,kierowca,query,posting_date)
values('$name','$kod','$miejscowosc','$ulica','$telefon','$kwota','$porat','$mata','$pas','$system','$wplata','$practi','$forma','$gold','$stat','$ilver','$tablet','$lozko','$rodzaj','$prelegent','$multi','$turbo','$asystent','$wyciskarka','$kierowca','$query','$pd')");
if ($con->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
$_SESSION['msg']="Umowa została dodana";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta charset="utf-8" />
<title>CRM | Request Quote</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta content="" name="description" />
<meta content="" name="author" />
<link href="assets/plugins/pace/pace-theme-flash.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/plugins/boostrapv3/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/boostrapv3/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/animate.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/plugins/jquery-scrollbar/jquery.scrollbar.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/responsive.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/custom-icon-set.css" rel="stylesheet" type="text/css"/>
</head>
<body class="">
<?php include("header.php");?>
<div class="page-container row-fluid">
<?php include("leftbar.php");?>
<div class="clearfix"></div>
</div>
</div>
<a href="#" class="scrollup">Scroll</a>
<div class="footer-widget">
<div class="progress transparent progress-small no-radius no-margin">
<div data-percentage="79%" class="progress-bar progress-bar-success animate-progress-bar" ></div>
</div>
<div class="pull-right">
</div>
</div>
<div class="page-content">
<div id="portlet-config" class="modal hide">
<div class="modal-header">
<button data-dismiss="modal" class="close" type="button"></button>
<h3>Widget Settings</h3>
</div>
<div class="modal-body"> Widget settings form goes here </div>
</div>
<div class="clearfix"></div>
<div class="content">
<div class="page-title">
<h3>Wprowadz umowe</h3>
<div class="row">
<div class="col-md-12">
<form class="form-horizontal" method="post" enctype="multipart/form-data">
<div class="panel panel-default">
<p style="color:#F00;"><?php echo $_SESSION['msg'];?><?php echo $_SESSION['msg']="";?></p>
<div class="panel-body">
<p>Please click below mention services of your interest to receive quotation for the same:</p>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label">Name </label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="nie" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Contact no</label>
<div class="col-md-9 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="email" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">cos tam</label>
<div class="col-md-9 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="dlaczego" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">cos tam1</label>
<div class="col-md-9 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="poco" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">cos tam3</label>
<div class="col-md-9 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="cos_tam" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Service Required :</label>
<div class="col-md-9">
<label class="check">
<input type="checkbox" class="icheckbox" name="wdnd" value="Website Design & Development" checked="checked"/> Website Design & Development</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="seo" value="SEO (Search Engine Optimization)" />SEO (Search Engine Optimization) </label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="swd" value="Static Website Design" /> Static Website Design</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="fwd" value="Flash Website Development" /> Flash Website Development</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="whs" value="Web Hosting Services" /> Web Hosting Services</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="ed" value="Ecommerce Development"/> Ecommerce Development</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="opi" value="Online Payment Integration" /> Online Payment Integration</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="da" value="Dash board Application" /> Dash board Application</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="nd" value="NewsLetter Design" /> NewsLetter Design</label><br>
<label class="check">
<input type="checkbox" class="icheckbox" name="cms" value="CMS (Content Management System)" />CMS (Content Management System)</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label">Email</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="cos_tam1" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Company</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="cos_tam2" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Company</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="smo" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">cos tam2</label>
<div class="col-md-9 col-xs-12">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="dwd" class="form-control" required/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Forma płatności</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="dt" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Status umowy</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="wm" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Rodzaj rachunku</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="wta" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Prelegent</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="ld" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Asystent</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="osc" class="form-control datepicker" value="" required>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Kierowca</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-pencil"></span></span>
<input type="text" name="other" class="form-control datepicker" value="" required>
</div>
</div>
</div>
</div>
<div style="margin-top:20px;" class="col-md-6">
<div class="form-group">
<label class="col-md-3 control-label">Query</label>
<div class="col-md-9 col-xs-12">
<textarea class="form-control" rows="5" name="query" required></textarea>
</div>
</div></div>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-default">Clear Form</button>
<input value="Submit" type="submit" name="submit" class="btn btn-primary pull-right">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/plugins/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-ui/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/plugins/breakpoints.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-unveil/jquery.unveil.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-block-ui/jqueryblockui.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-scrollbar/jquery.scrollbar.min.js" type="text/javascript"></script>
<script src="assets/plugins/pace/pace.min.js" type="text/javascript"></script>
<script src="assets/plugins/jquery-numberAnimate/jquery.animateNumbers.js" type="text/javascript"></script>
<script src="assets/js/core.js" type="text/javascript"></script>
<script src="assets/js/chat.js" type="text/javascript"></script>
<script src="assets/js/demo.js" type="text/javascript"></script>
</body>
</html>
Screen struktury tabeli: