FYI, fields will always be submitted even if it's blank. You have to do more validation than you did. For example...
Code: Select all
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
Code: Select all
<input type=radio value='male' [color=red]checked[/color]>
<input type=radio value='female'>
God bless.

)&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "e;Lastname field not filled in."e;;
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
Code: Select all
<input type=radio value='male' [color=red]checked[/color]>
<input type=radio value='female'>
God bless.

ed[/color]>
<input type=radio value='female'>
God bless.

more validation than you did. For example...
Code: Select all
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
Code: Select all
<input type=radio value='male' [color=red]checked[/color]>
<input type=radio value='female'>
God bless.

check if variable set or filled in
if(isset($_POST['lastname'])&&$_POSTї'lastname']!='')
$lastname = $_POSTї'lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "e;Lastname field not filled in."e;;
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
Code: Select all
<input type=radio value=e to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted iflways be submitted even if it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' [color=red]checked[/color]>
<input type=radio value='female'>
[/code]
God bless. :wink:do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option if it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' їcolor=red]checkedї/color]>
<input type=radio value='female'>
[/code]
God bless. :wink:lways be submitted even if it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' їcolor=red]checkedї/color]>
<input type=radio value='female'>
[/code]
God blese']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are f it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default oyou did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' їcolor=red]checkedї/color]>
<input type=radio variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. Avalidation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of thlways be submitted even if it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' їcolor=red]checkedї/color&did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of lways be submitted even if it's blank. You have to do more validation than you did. For example...
[php]
// check if variable set or filled in
if(isset($_POST['lastname'])&&$_POST['lastname']!='')
$lastname = $_POST['lastname'];
else
$lastname = '';
// if not tell the user
if($lastname=='')
echo "Lastname field not filled in.";
[/php]
Now radioboxes are different, for it will not be submitted if the user didn't select any of them. And it is wise to choose one of them to be the default option.
[code]
<input type=radio value='male' їcolor=red]checkedї/color]>
<input type=radio value='female'>
God bless.
