I got this code
<form action="MyCurrentPage.php" method="post" >
<label for="name_of_trainer"> Name Trainer </label>
<input type="text" name="name_of_trainer" id="name_of_trainer"/>
<label for="double"> yearly Income </label>
<input type="text" name="yearly_income id="yearlyincome"/>
<input type= "submit" value="submit" name="submit" />
</form>
?php
if (isset($_POST['submit'])) {
$yearly_income_adition=$_POST['name_of_trainer'];
$yearly_income=$_POST['yearly_income'];
$mysqli->select_db("trainers");
$sql="INSERT INTO trainers (titleCD, yearly_income) VALUES ('".$yearly_income_adition."','".$yearly_income.'")";
$mysqli->query($sql);
}
?>
and I am using it to insert new values into my database but it is not working, the values are not being added and I dont get any error. Do I have a syntax error?