hello guys.

Just want a little guide here.. because there's no error in program but the data is not inserting to database.

Thank you and god speed!.


$conn=odbc_connect ('visitor_list','','') or die ("Error cant connect to database");
$sql = "select * from TEMP_LIST";
$rs = odbc_exec($conn,$sql);

if (!$rs)
    exit("Error in sql");
$emp_no = $_POST['emp_no']; 
$family_name= $_POST['family_name']; 

$query_insert = "insert into TEMP_LIST (emp_no, family_name) Values ('$emp_no','$family_name')";

if ($query_insert)



<title>User Login</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<form method="POST" action="visitor_register.php">
<table border="0" cellpadding="10" cellspacing="1" width="500" align="center">
<tr class="tableheader">
<td align="center" colspan="2">Guest Reservation Registration</td>
<tr class="tablerow">
<td align="right">Employee Number</td>
<td><input type="number_format" name="emp_no" required = "required"></td>
<tr class="tablerow">
<td align="right">Family Name</td>
<td><input type="text" name="family_name" required = "required"></td>
<tr class="tableheader">
<td align="center" colspan="2"><input type="submit" name="submit" value="Register" 
 align="center" colspan="2"/> &nbsp; &nbsp; &nbsp;
 <input type="button" name="back" value="Back"></td>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.