<form id= "Form1" Name= "Form1" method= "Post" action= "" >
<label>
<input type= "text" name= "CNAME"/>
</label>
<p>
<label>
<input type= "text" name= "caddress"/>
</label>
<label>
<input type= "text" name= "Ctel"/>
</label>
<label>
<input type= "text" name= "Cfix"/>
</label>
<label>
<input type= "text" name= "Cmail"/>
</label>
</p>
</form>
<?php
Include (DirName (__file__). /inc/gg_function.php ');
if ($_post)
{
$_cname = get_value (' CNAME ', 1);
$_address = Get_value (' caddress ', 1);
$_tel = Get_value (' Ctel ', 1);
$_fix = Get_value (' Cfix ', 1);
$_mail = Get_value (' Cmail ', 1);
if (Empty ($_cname) | | | strlen ($_cname) >200)
{
ShowMsg (' Please enter company name! ');
}
ElseIf (empty) ($_address) | | | strlen ($_address) >200)
{
ShowMsg (' Please enter the company address! ');
}
ElseIf (empty) ($_tel) | | | strlen ($_TEL) >12)
{
ShowMsg (' Please enter the correct telephone number ');
}
ElseIf (empty) ($_fix) | | | strlen ($_FIX) >20)
{
ShowMsg (' Enter fax number ');
}
ElseIf (empty) ($_mail) | | | strlen ($_mail) >254)
{
ShowMsg (' Enter the correct email address ');
}
else{
$_sql = "Insert into Gx_coo (c_name,c_address,c_tel,c_fix,c_maile) value" (' $_cname ', ' $_address ', ' $_tel ', ' $_fix ', ' $_ ') Mail ') ";
if (mysql_query ($_sql))
{
ShowMsg (' Information save success! ');
}
Else
{
ShowMsg (' operation failed, please try again! ');
}
}
}
?>