I am trying to insert a row in a table but its giving me syntax error.
Here is the HTML Code:
<form method="post" action="" >
<!--form fields-->
<div class="control-group">
<div class="customer_data">
<div class="controls" id="id_milesPerDay">
<label for="ICAO" class="left-text">ICAO:</label>
<input type="text" id="ICAO" style='text-transform:uppercase' maxlength="4" name="ICAO" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="IATA" class="left-text">IATA:</label>
<input type="text" name="IATA" maxlength="3" style='text-transform:uppercase' id="IATA" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="airportname" class="left-text">Airport Name:</label>
<input type="text" name="airport_name" maxlength="" id="Airport_Name" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="coordinates" class="left-text">Coordinates:</label>
<input type="text" name="coordinates" maxlength="" id="Coordinates" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="Time_zone_UTC" class="left-text">Time Zone UTC:</label>
<input type="text" name="Time_zone_UTC" maxlength="3" id="Time_zone_UTC" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="DST" class="left-text">DST:</label>
<input type="checkbox" name="dst" value="other" id="DST" placeholder="" class="input-xlarge">
</div>
<div class="controls text">
<label for="utc" class="left-text">UTC:</label>
<input type="text" name="utc" maxlength="3" id="UTC" placeholder="" class="input-xlarge">
</div>
<div class="controls text">
<label for="From_date" class="left-text">From Date:</label>
<input type="date" name="from_date" maxlength="" id="fromdate" placeholder="" class="input-xlarge">
</div>
<div class="controls text">
<label for="To_date" class="left-text">To Date:</label>
<input type="date" name="to_date" maxlength="" id="todate" placeholder="" class="input-xlarge">
</div>
<!-- Button -->
<div class="control-group">
<div class="controls">
<input type="submit" value="Submit" id="Submit" class="btn btn-success" name="Submit">
</div>
</div>
</div>
<div class="customer_aircraft">
<div class="controls">
<label for="country_code" class="left-text">Country Code:</label>
<input type="text" name="country_code" maxlength="2" style='text-transform:uppercase' id="countrycode" placeholder="" class="input-xlarge" required>
</div>
<div class="controls">
<label for="Remarks" class="left-text">Remarks:</label>
<textarea cols="25" rows="7" name="remarks" id="remarks" placeholder="" class="input-xlarge"></textarea>
</div>
<div class="controls">
<label for="Country" class="left-text">Country: </label>
<input type="text" name="country" maxlength="" id="country" placeholder="" class="input-xlarge" required>
</div>
</div>
</div>
</form>
</body>
</html>
PHP Code:
<?php
$link=require ("Connection.php");
error_reporting(E_ALL); ini_set('display_errors', 1);
if(isset($_POST['Submit']))
{
$ICAO= mysqli_real_escape_string($link,$_POST['ICAO']);
$IATA= mysqli_real_escape_string($link,$_POST['IATA']);
$Airport_Name= mysqli_real_escape_string($link,$_POST['airport_name']);
$coordinates= mysqli_real_escape_string($link,$_POST['coordinates']);
$Time_zone_UTC= mysqli_real_escape_string($link,$_POST['Time_zone_UTC']);
$DST= mysqli_real_escape_string($link,$_POST['dst']);
$UTC= mysqli_real_escape_string($link,$_POST['utc']);
$from_date = mysqli_real_escape_string($link,$_POST['from_date']);
$to_date = mysqli_real_escape_string($link,$_POST['to_date'];
$country_code= mysqli_real_escape_string($link,$_POST['country_code']);
$remarks= mysqli_real_escape_string($link,$_POST['remarks']);
$Country= mysqli_real_escape_string($link,$_POST['country']);
//inserting records//
$sql="INSERT INTO airport_data (ICAO,IATA,Airport_name,Coordinates,Time_zone_utc,DST,UTC,From,To,Country_code,Remarks,Country) VALUES ('$ICAO','$IATA','$Airport_Name','$coordinates','$Time_zone_UTC','$DST','$UTC',STR_TO_DATE('$from_date', '%m/%d/%y'),STR_TO_DATE('$to_date', '%m/%d/%y'),'$country_code','$remarks','$Country')";
if(mysqli_query($link, $sql))
{
echo "Records added successfully.";
}
else
{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
// close connection
mysqli_close($link);
}
?>
Here is the error I receive:
ERROR: Could not able to execute INSERT INTO airport_data (ICAO,IATA,Airport_name,Coordinates,Time_zone_utc,DST,UTC,From,To,Country_code,Remarks,Country) VALUES ('oprn','op','islamabad airport','islam','+9','other','+8',STR_TO_DATE('2015-05-26', '%m/%d/%y'),STR_TO_DATE('2015-05-20', '%m/%d/%y'),'op','p','Pakistan'). You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From,To,Country_code,Remarks,Country) VALUES ('oprn','op','islamabad airport','i' at line 1
Escape (at least) reserved words in column names.
... `From`, `To`, ...
Full list of MySQL reserved words is in http://dev.mysql.com/doc/refman/5.6/en/reserved-words.html.
from and to are reserve keyword. Avoid to use them as column name. You need to change these column name.
You can find more details here
Actually the format of my date variables was wrong so i had to change it like
$from_date = new DateTime($_POST['from_date']);
$to_date = new DateTime($_POST['to_date']);
Insert the following into the database
$from_date = mysqli_real_escape_string($link, $from_date->format('Y-m-d'));
$to_date = mysqli_real_escape_string($link, $to_date->format('Y-m-d'));
And in query
some thing like
,'".$from_date."','".$to_date."',
Related
I want to update the record of the corresponding id that is sent on clicking save button. I tried button tage, input tage and link tage but there is some mistake that I am making, but I don't know where?
This is my form
<form method="POST" action="handle_update.php">
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">First name</label>
<input type="text" name="fname" value="'.$first_name.'" class="form-control" >
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Last name</label>
<input type="text" name="last_name" value="'.$last_name.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Email</label>
<input type="email" name="email" value="'.$email.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Designation</label>
<input type="text" name="designation" value="'.$designation.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Address</label>
<input type="address" name="address" value="'.$address.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Date of Joining</label>
<input type="date" name="joining_date" value="'.$joining_date.'" class="form-control">
</div>
<a name="update" role = "button" type="submit" href="handle_update.php?ployee_id='.$id2.'">Save</a>
</form>
Add a hidden input field that holds the value you want to submit. Change your <a> to a <button> that can submit your form. Change your code to:
<form method="POST" action="handle_update.php">
<input type="hidden" name="ployee_id" value="' . $id2 . '">
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">First name</label>
<input type="text" name="fname" value="'.$first_name.'" class="form-control" >
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Last name</label>
<input type="text" name="last_name" value="'.$last_name.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Email</label>
<input type="email" name="email" value="'.$email.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Designation</label>
<input type="text" name="designation" value="'.$designation.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Address</label>
<input type="address" name="address" value="'.$address.'" class="form-control">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Date of Joining</label>
<input type="date" name="joining_date" value="'.$joining_date.'" class="form-control">
</div>
<button type="submit" name="update">Save</button>
</form>
More on forms: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form
More on hidden inputs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/hidden
So, like the title said, i'm having an issue while i'm populating a text area that is being used on HTML form, because it is not getting any content in it.
this is the form with the php while.
<?php
while ($row = mysqli_fetch_array($query))
{ echo '
<form action="insert/insertReport.php" id="newReport" method="post">
<div class="form-group">
<label for="clientRep">Cliente</label>
<br>
<input type="text" name="client" class="form-control" id="client" value="'.$row['client'].'">
</div>
<div class="form-group">
<label for="titleRep">Título do Relatório</label>
<br>
<input type="text" name="title" class="form-control" id="title" value="'.$row['title'].'">
</div>
<div class="form-group">
<label for="namefat">Data</label>
<br>
<input type="text" name="date" class="form-control" id="date" value="'.$row['date'].'">
</div>
<div class="form-group">
<label for="localRep">Local</label>
<br>
<input type="text" name="local" class="form-control" id="local" value="'.$row['local'].'">
</div>
<div class="form-group">
<label for="reportRep">Relatório</label>
<br>
<textarea rows="12" name="report" class="form-control" id="report" form="newReport" value="'.$row['report'].'"></textarea>
</div>
<input type="hidden" name="id" class="form-control" id="id" value="'.$row['id'].'">';
}?>
And this is the php query.
$sql = 'SELECT * FROM reports'
Does anyone know what's wrong with it?
Text area does not accept a value attribute. You place the contents between the textarea tags:
<textarea rows="12" name="report" class="form-control" id="report" form="newReport">'.$row['report'].'</textarea>
I am new to html & php and I appreciate your help. I am trying to accept user input into a webpage and then after the user clicks the submit button, write a new record out to MySQL. I am using Wordpress so the tags are not exactly textbook.
So my first problem is that the submit button does not appear to execute the php code. I also would appreciate it if someone could check how I am passing my html field names to the php variables to make sure that I am on the right track. Thanks for your help!
<form
action="employee_list.php" method="post"
<input type="submit"
name="passport" id="passport" action="uraction" method="post" enctype="multipart/form-data"
<label for="upload" >Select Employee Passport</label><input type="file" id="upload" name="upload" accept="image/*">
<p/>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="name">Employee Full Name</label>
<input type="text" class="form-control" id="exampleInputName" aria-describedby="nameHelp" placeholder="Enter Full Name">
</div>
<div class="col-md-6">
<label for="gender">Gender</label>
<select type="text" class="form-control" id="exampleInputLastName" aria-describedby="nameHelp">
</select>
</div>
<div class="col-md-6">
<label for="maritalstatus">Marital Status</label>
<select type="text" class="form-control" id="exampleInputLastName" aria-describedby="nameHelp">
</select>
</div>
<div class="col-md-6">
<label for="department">Department</label>
<input type="text" class="form-control" id="Position" aria-describedby="nameHelp" placeholder="Enter The Department">
</div>
<div class="col-md-6">
<label for="salary">Salary</label>
<input type="number" class="form-control" id="salary" aria-describedby="nameHelp" placeholder="">
</div>
<div class="col-md-6">
<label for="certificate"> Highest Certificate Acquired</label>
<input type="text" class="form-control" id="salary" aria-describedby="nameHelp" placeholder="Enter Highest Certificate Acquired">
</div>
</div>
</div>
<div class="form-group">
<label for="Email">Email Address</label>
<input type="emai" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
</div>
<div class="form-group">
<label for="address">House Address</label>
<input type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter House Address">
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="phonenumber">Phone Number</label>
<input type="number" class="form-control" id="phonenumber">
</div>
</form>
</div>
<!-- /.content-wrapper -->
PHP script:
<?php
if(isset($_POST['submit'])) {
$SQL = "INSERT INTO tbl_employee (name, gender,
marital_status,department,salary,certificate, email,address,phone_number)
VALUES ('$_POST[name]', '$_POST[gender]',
'$_POST[marital_status],'$_POST[department]','$_POST[salary]
','$_POST[certificat
e]','$_POST[email]','$_POST[address]','$_POST[phone_numer]')"; $result =
mysql_query($SQL);
}
?>
<html>
<head>
<title>Check</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<?php include('dbconnect.php');
if($_POST['submit']){
$fullname = $_POST['exampleInputName'];
$gender = $_POST['gender'];
$status = $_POST['status'];
$position = $_POST['position'];
$salary = $_POST['salary'];
$certificate = $_POST['certificate'];
$exampleInputEmail1 = $_POST['exampleInputEmail1'];
$phonenumber = $_POST['phonenumber'];
}
$data = "INSERT INTO test (`id`, `fullname`, `gender`, `matrial_status`, `department`, `salary`, `certificate`, `email`, `address`)VALUES ('', '$fullname', '$gender', '$status', '$position', '$salary', '$certificate', '$exampleInputEmail1', '$phonenumber')";
mysqli_query($con,$data);
?>
<form action="checkbox.php" method="POST" >
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="name">Employee Full Name</label>
<input type="text" class="form-control" id="exampleInputName" name="exampleInputName" aria-describedby="nameHelp" placeholder="Enter Full Name">
</div>
<div class="col-md-6">
<label for="gender">Gender</label>
<select type="text" name="gender" class="form-control" id="gender" aria-describedby="nameHelp">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<div class="col-md-6">
<label for="maritalstatus">Marital Status</label>
<select type="text" name="status" class="form-control" id="status" aria-describedby="nameHelp">
<option value="Married">Married</option>
<option value="Unmarried">Unmarried</option>
</select>
</div>
<div class="col-md-6">
<label for="department">Department</label>
<input type="text" class="form-control" name="position" id="position" aria-describedby="nameHelp" placeholder="Enter The Department">
</div>
<div class="col-md-6">
<label for="salary">Salary</label>
<input type="number" class="form-control" name="salary" id="salary" aria-describedby="nameHelp" placeholder="">
</div>
<div class="col-md-6">
<label for="certificate"> Highest Certificate Acquired</label>
<input type="text" class="form-control" id="certificate" name="certificate" aria-describedby="nameHelp" placeholder="Enter Highest Certificate Acquired">
</div>
</div>
</div>
<div class="form-group">
<label for="Email">Email Address</label>
<input type="emai" class="form-control" id="exampleInputEmail1" name="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
</div>
<div class="form-group">
<label for="address">House Address</label>
<input type="text" class="form-control" id="exampleInputEmail1" name="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter House Address">
</div>
<div class="form-group">
<div class="form-row">
<div class="col-md-6">
<label for="phonenumber">Phone Number</label>
<input type="text" class="form-control" name="phonenumber" id="phonenumber">
</div>
</div>
</div>
<input type="submit" name="submit" id="passport">
</form>
</body>
I have to create a form where answers get sent to the database but when I fill in the form the database is not updating and I have getting the self made error :"something went wrong". Can anyone see anything wrong? Thanks.
Form:
<form id="contact-form" method="post" action="sentEnquiries.php" name="enquiries">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="name">
Name</label>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span>
</span>
<input type="text" class="form-control" id="name" name="name" placeholder="Enter name" required="required" /></div>
</div>
<div class="form-group">
<label for="email">
Email Address</label>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span>
</span>
<input type="email" class="form-control" id="email" name="email" placeholder="Enter email" required="required" /></div>
</div>
<div class="form-group">
<label for="phoneNumber">
Phone Number</label>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-earphone"></span>
</span>
<input type="tel" class="form-control" id="phoneNumber" name="phone" placeholder="Enter phone number" required="required" /></div>
</div>
<div class="form-group">
<label for="partySize">
Party Size</label>
<input type="number" min="1" max="6" class="form-control" id="partySize" name="partySize" required="required" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="arrivalDate">
Arrival Date</label>
<input type="date" class="form-control" id="arrivalDate" name="arrivalDate" />
</div>
<div class="form-group">
<label for="departureDate">
Departure Date</label>
<input type="date" class="form-control" id="departureDate" name="departureDate"/>
</div>
<div class="form-group">
<label for="name">
Message</label>
<textarea name="message" id="message" class="form-control" rows="9" cols="25" required="required"
placeholder="Message"></textarea>
</div>
</div>
<div class="col-md-12">
<button type="submit" class="btn btn-skin pull-right" id="btnContactUs">
Send enquiry</button>
</div>
</div>
</form>
Answers:
<?php
include("conn.php");
$sentName = $_POST['name'];
$sentEmail = $_POST['email'];
$sentPhone = $_POST['phone'];
$sentPartySize = $_POST['partySize'];
$sentArrivalDate = $_POST['arrivalDate'];
$sentDepartureDate = $_POST['departureDate'];
$sentMessage = $_POST['message'];
$insertQuery = "INSERT INTO Enquiries(enquiryID, name, email, phone, partySize, arrivalDate, departureDate, message) VALUES(NULL, '$sentName', '$sentEmail', '$sentPhone, '$sentPartySize', $sentArrivalDate, '$sentDepartureDate', '$sentMessage')";
?>
Further down answers doc:
<div class="descriptions">
<?php
if(mysqli_query($conn, $insertQuery)) {
echo "<p>Thank you for your enquiry.</p>";
mysqli_close($conn);
} else {
echo "<p>Something went wrong.</p>";
mysqli_close($conn);
}
?>
</div>
could you make sure as below :
enquiryID column, is this column is auto increment if not better you set the id become auto increment primary key
For debug purposes, can you echo first in $_POST['name'] then exit; to make sure that the post data from your html is work correctly.
if that not work, you should try to select first from database with simple query, so you will know the connection to database table is work correctly
Here is how i'd do it.
Change yours as required but here's my example:
PDO class:
class form
{
public function sendForm($name, $email, $phone, $party, $date, $depart, $message)
{
$stmt = $this->conn->prepare("INSERT INTO `enquiries` (`name`,`email`,`phone`,`partySize`,`arrivalDate`,`departureDate`,`message`) VALUES (:fname, :email, :phone, :party, :arrive, :depart, :msg)");
$stmt->bindParam(array(':fname' => $name, ':email' => $email, ':phone' => $phone, ':party' => $party, ':arrive' => $date, ':depart' => $depart, ':msg' => $message));
$stmt->execute();
}
}
Then within your form page:
$form = new form();
if (isset($_POST['sendIt']))
{
$form->sendForm($_POST['Fname'],$_POST['email'],$_POST['phone'],$_POST['size'],$_POST['date'],$_POST['depart'],$_POST['message']);
}
Then my basic form without the div tagging so you'll need to tweak slightly:
<form action="" method="post">
<input type="text" name="Fname">
<input type="email" name="email">
<input type="text" name="phone">
<input type="text" name="size">
<input type="text" name="date">
<input type="text" name="depart">
<textarea name="message" id="" cols="30" rows="10"></textarea>
<input type="submit" name="sendIt">
</form>
This is a very basic one with no thank you message or conditions but you can easily add conditions before running the query by doing
if (!empty($var)
{
// do something
} else {
echo "you didnt fill this in...";
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a problem that might be a syntax problem but I can't seem to figure out what I am doing wrong.
I have created a form and when I click on submit, the data in the form is not sent to my mysql database.
Here is my html code
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-10">
<h1 class="page-head-line">Forms </h1>
</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
BASIC FORM ELEMENTS
</div>
<div class="panel-body">
<form method="post" action="insert.php" >
<div class="form-group">
<label for="name">Name</label>
<input name="name' type="text" class="form-control" id="name" placeholder="Enter your name" required/>
</div>
<div class="form-group">
<label for="project_num">OIT-GIS Project Number</label>
<input name="project_num' type="text" class="form-control" id="project_num" placeholder="OIT-GIS Project Number" />
</div>
<div class="form-group">
<label for="project_name">Project Name</label>
<input name="name' type="text" class="form-control" id="project_name" placeholder="Project Name" required/>
</div>
<div class="form-group">
<label for="easyvista">EasyVista Ticket Number</label>
<input name="easyvista' type="text" class="form-control" id="easyvista" placeholder="EasyVista Ticket Number" />
</div>
<div class="form-group">
<label for="agency">Requestor/Agency</label>
<input name="agency' type="text" class="form-control" id="agency" placeholder="Requestor or Agency" />
</div>
<div class="form-group">
<label for="description">Description of Work:</label>
<input name="description' type="text" class="form-control" id="agency" placeholder="Description" />
</div>
<div class="form-group">
<label for="input-date">Enter Today Date</label>
<input name="input-date' type="date" value="">
<span class="result"></span>
</div>
<div class="form-group">
<div class="col-md-10">
<input id="submit" name="submit" type="submit" class="btn btn-primary">
</div>
</div>
</form>
</div>
</div>
and here is my php
<?php
echo $POST;
error_reporting(E_ALL);
ini_set('display_errors', 1);
include("../includes/config.php");
if (isset($_POST['submit'])) {
echo $_POST['submit'];
$name = $_POST['name'];
$projectnum = $_POST['project_num'];
$projectname = $_POST['project_name'];
$easyvista = $_POST['easyvista'];
$agency = $_POST['agency'];
$description = $_POST['description'];
$startDate = $_POST['input-date'];
$sql="INSERT INTO statusreport(name, project_num, project_name, easyvista, agency, description)
VALUES
('$name','$projectnum', '$projectname', '$easyvista', '$agency', '$description')";
if (!mysqli_query($conn, $sql))
{
die('Error: ' . mysqli_connect_error($conn));
}
echo "Entry is recored <br/>";
echo "Name:", $name, "<br/>";
echo "test..................<br/>", $name;
/*header("location: http://10.1.7.129//gisadmin/admin/forms.php");*/
//echo "<script>setTimeout(\"location.href = 'http://10.1.7.129//gisadmin/admin/forms.php';\",700);</script>";
mysqli_query($conn, $sql);
}
else {
echo "No data";
}
?>
Any help would be greatly appreciated.
Thanks
You have a mixing of single and double quotes here, the name attributes are opening the value with double quotes and closing with single quotes, should be as follows:
<form method="post" action="insert.php" >
<div class="form-group">
<label for="name">Name</label>
<input name="name" type="text" class="form-control" id="name" placeholder="Enter your name" required/>
</div>
<div class="form-group">
<label for="project_num">OIT-GIS Project Number</label>
<input name="project_num" type="text" class="form-control" id="project_num" placeholder="OIT-GIS Project Number" />
</div>
<div class="form-group">
<label for="project_name">Project Name</label>
<input name="project_name" type="text" class="form-control" id="project_name" placeholder="Project Name" required/>
</div>
<div class="form-group">
<label for="easyvista">EasyVista Ticket Number</label>
<input name="easyvista" type="text" class="form-control" id="easyvista" placeholder="EasyVista Ticket Number" />
</div>
<div class="form-group">
<label for="agency">Requestor/Agency</label>
<input name="agency" type="text" class="form-control" id="agency" placeholder="Requestor or Agency" />
</div>
<div class="form-group">
<label for="description">Description of Work:</label>
<input name="description" type="text" class="form-control" id="agency" placeholder="Description" />
</div>
<div class="form-group">
<label for="input-date">Enter Today Date</label>
<input name="input-date" type="date" value="">
<span class="result"></span>
</div>
<div class="form-group">
<div class="col-md-10">
<input id="submit" name="submit" type="submit" class="btn btn-primary">
</div>
</div>
</form>
And then, as #Fred -ii stated in his comment, the php script is wrong:
echo $POST;
That line is wrong, there is no variable with name $POST before that code.
Are you getting success message but database is not getting updated OR Getting Total Error...???
1) Check for double quotes and single quotes..
<div class="form-group">
<label for="name">Name</label>
<input name="name" type="text" class="form-control" id="name" placeholder="Enter your name" required/>
</div>
2) Also check for path... for
include("../includes/config.php");
Is it correct or not...?
3)
<label for="project_name">Project Name</label>
<input name="name' type="text"
SHOULD BE
<label for="project_name">Project Name</label>
<input name="project_name" type="text"