By following some example on the internet I managed to make a form to insert user.

I used isset for the submit function. When the form is completely filled and submit, the result will be echo to show the status message. Unfortunately, the form didn't work at all and when submit button is clicked, the form is reset.

Since I use stored procedure, both of the `ReturnStatus` and `ReturnMessage` will be automatically called according to the input value from the form.

Here's the code.

```
<?php
include "config.php";
if(isset($_POST['sub']))
{

ini_set('error_reporting', E_ALL);

error_reporting(-1);

$RegType="D";
$UserId=$_POST["UserId"];
$UserPwd=$_POST["UserPwd"];
$UserNm=$_POST["UserNm"];

$stmt=odbc_exec($conn,"CALL UserInsert ('".$RegType."','UserId','UserPwd','UserNm')");

if (!$stmt) {
"Error : " . odbc_errormsg();
}

if (odbc_fetch_row($stmt)) {
$ReturnStatus=odbc_result($stmt,'ReturnStatus');
$ReturnMessage=odbc_result($stmt,'ReturnMessage');
}

if($ReturnStatus==1) {
echo $ReturnMessage=odbc_result($stmt,'ReturnMessage');
}        
}  
?>

<table>
<form class="form"  method="post">

<tr>
<td class = "nama">Nama Pengguna<span class="required">&nbsp; * &nbsp;</span></td>
<td><input type="text" name="UserNm" value=""></td>
</tr>

<tr>
<td class = "userid">Id Pengguna<span class="required">&nbsp; * &nbsp;</span></td>
<td><input type="text" name="UserId" value=""></td>
</tr>

<tr>
<td class = "password">Kata Laluan<span class="required">&nbsp; * &nbsp;</span></td>
<td><input type="password" name="UserPwd" value=""></td>
</tr>

<tr><td>
<input type="submit" value="Save">
</td></tr>
</table> 

```

I'm sure I miss something. Please guide me. Thank you.

**UPDATED**

Fixed the following : 

```
- Fix the name of the button
- PHP error reporting
- Isset

```