hi people i have these two scripts for fill a database table on my PC , with an HTML form . the HTML code works perfect but the php it just does not work , i have specified everything ,but it just doesn't work , when i give click on submit the browser just pop ups a download option but nothing else...
<html>
<head>
<tittle>
<h1 > <b> FORMAT FOR TECHNICAL ISSUES
<link rel="stylesheet" href="/var/www/html/proyecto/css/styles.css">
</b> </h1>
</tittle>
<hr> </hr>
</head>
<body>
<div>
<img src="logo.png" width=100% /img>
<hr> </hr>
<form method="POST" action="">
<input type="text" placeholder="NOMBRE" name="Nombre" maxlenght="30" size="20px" id="nombre" >
<input type="text" name="Extension" placeholder=EXTENSION maxlength="5" id="extension">
<br>
<hr> </hr>
<br>
<br>
<h2> CAMPAIGN /CAMPAÑA </h2>
<br>
<label for="Campaign"> Select your campaign:</label>
<select name="Campaign" id="campaign" >Campaign
<option value="Procall">Procall</option>
<option value="Tigo">Tigo</option>
<option value="Spanish">Spanish</option>
</select>
<hr> </hr>
<h2> KIND OF FAILURE </h2>
<label for="Tipo de incidente">Select the type of incident:</label>
<select id="incident" name="incidente" placeholder="Tipo de incidente">incident
<option value="Slow Computer">Slow Computer</option>
<option value="Headset fail"> Headset Fail </option>
<option value="Zoiper Issue">Zoiper Issue </option>
<option value="Crm Issue">Crm Issue </option>
<option value="Spark Issue">Spark Issue </option>
<option value="Vc Dialer Issue">VC Dialer Issue </option>
<option value="Network Issue">Network Issue </option>
</select>
<input type"text" id="description" name="Description" placeholder=DESCRIPTION style="width:300px;height:100px">
<br></br>
<h2>FAILURE DATE </h2>
<label for="failure date"> Enter the day and hour when failure occurred :</label>
<input name="failure_date" type="date-time-local" placeholder="yyyy/mm/dd/hh/mm" id="failure date" min="2018-05-01T08:30" max="2018-12-30T22:30" >
<br>
<hr></hr>
<label for="did you lose a call?" id="lost_call" >Did you lose any call?:</label>
<br>
<input type="radio" name="lost call" value="yes " id="lost_call" > Yes , i lost a call.
<br>
<input type="radio" name="lost_call" value="no" id="lost_call" >No i have not lost any call
<br
<br>
<label id="lost docmuent" for="did you lose any document?"> Did you lose any document or information?:</label>
<br>
<input type="radio" name="document" value="yes"> Yes i lost one or more documents
<br>
<input type="radio" name="document" value="no"> No have not lost any document.
<br>
<br>
<label for="did you have to log out?" id="logout" > Did you have to logout?:</label>
<br>
<input type="radio" name="logout" value="yes">Yes i had to logout
<br>
<input type="radio" name="logout" value="no">no i didn't have to logout
<br>
<br>
<br>
<br>
<input type="submit">
</form>
</div>
</body>
</html>
and here is the php script for the action and connect to the sql database
<?php
$con = mysql_connect("localhost","root","m0l0t0v" );
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("it", $con);
$sql="INSERT INTO tec-issues (Nombre,Extension ,Campaign ,incidente,Description,failure_date,lost_call,document,logout )
VALUES
('$_POST[Nombre]', '$_POST[Extension]', '$_POST[Campaign]', '$_POST[incidente]', '$_POST[Description]', '$_POST[failure_date]', '$_POST[lost_call]', '$_POST[document]', '$_POST[logout]' )";
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
PLEASE HELP ME EVERYTHING IS CORRECT , BUT IT JUST DONT WORK