im try to take data from html form and transfer it to my DB using post and php. Whenever I do, the data changes to something unfamiliar to me.
I'm very new to programming, please help me.
my html code:
<form action="insert.php" method="post">
<tbody>
<tr>
<td width="20%">privet name</td>
<td><input type="text" id="privetname" name="fname" size="16"></td>
</tr>
<tr>
<td width="20%"> last name</td>
<td><input type="text" id="lastname" name="lname" size="16"></td>
</tr>
<tr>
<td width="20%"> phone</td>
<td><input type="text" id="phone" name="phone" size="16"></td>
</tr>
<tr>
<td width="20%"> email</td>
<td><input type="email" id="email" name="email" size="16"></td>
</tr>
<tr>
<td width="20%"> birthday</td>
<td><input type="date" id="birthday" name="birthday"></td>
</tr>
<tr>
<td width="20%"> anniversary</td>
<td><input type="date" id="anniversary" name="anniversary"></td>
</tr>
<tr>
<td><button type="submit"><font size="+1">Create Customer</font></button></td>
</tr>
</tbody>
</form>
my php code:
$sql="INSERT INTO customer (fname, lname, phone, email, birthday, anniversary)
VALUES
('$_POST[fname]','$_POST[lname]','$_POST[phone]','$_POST[email]','$_POST[birthday]','$_POST[anniversary]')"; /* ,'$_POST[birthday]','$_POST[anniversary]' */