I am unable to check whether a $_REQUEST variable is empty or not.
Please go thru the code I am using.. Can anybody help it out for me?
<html>
<?php include ("allfuncs.php"); ?>
<body>
<?php
// get the variables from the URL request string
$chkstr_1 = '@7hhj9!';
// $fname = $REQUEST['f_fname'];
$mname = $REQUEST['f_mname'];
$lname = $REQUEST['f_lname'];
$passwd = $_REQUEST['f_passwd'];
$userid = 0;
if (!isset($_REQUEST['f_fname'])) {
echo "empty first name not allowed";
$fname = null;
}
//$catid = $_REQUEST['F_catid'];
$catid = 6;
// Connect database
condb();
// echo "$fname.' '.$mname.' '.$lname. .'xxxxx'";
// sql query for adding/inserting one record.
$query = "INSERT INTO usermst (fname,mname,lname,password,catid) VALUES ('$fname','$mname','$lname',aes_encrypt('$passwd','_@7hhj9!'),'$catid')";
?>
<table width="100%" border="0">
<tr>
<th bgcolor="#FF0000" scope="col">Call Board Service </th>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="15%"> </td>
<td width="70%" align="center" valign="middle"> </td>
<td width="15%"> </td>
</tr>
<tr>
<td width="15%"> </td>
<td width="70%" align="center" valign="middle"><P><B>
<?php
// print out the results
// save the info to the database
$results = mysql_query( $query);
if( $results)
{
echo( "Successfully saved the entry. Please note your User Identification No : ".mysql_insert_id());
}
else
{
die( "Trouble saving information to the database: " . mysql_error() );
}
mysql_free_result($result);
clsdb();
?></B>
</td>
<td width="15%"> </td>
</tr>
<tr>
<td width="15%"> </td>
<td width="70%" align="center" valign="middle"> </td>
<td width="15%"> </td>
</tr>
</table>
<table width="100%" border="0" bgcolor="#FF0000">
<tr>
<td align="center" valign="middle">Copyright to free world.</td>
</tr>
</table>
</body>
</html>
:bemused: