Hi there,
I have another problem out here. Im using the for loop to display an array
of element in the checkbox form.
My problem is how could i set the this if to an error message if their are a
NULL selection. By default this will display blank for no selection which i
whant to be avoided. I dont know what particular variable should i declare
if there are NULL selection so that i can incorporate that in an error
script.
Please help me.
Sample script:
<?
// check for $submit
if (!$submit)
{
// and display form
?>
<form action="test.php" method="GET">
<input type="checkbox" name="artist[]" value="Bon Jovi">Bon Jovi
<input type="checkbox" name="artist[]" value="N'Sync">N'Sync
<input type="checkbox" name="artist[]" value="Boyzone">Boyzone
<input type="checkbox" name="artist[]" value="Britney Spears">Britney Spears
<input type="checkbox" name="artist[]" value="Jethro Tull">Jethro Tull
<input type="checkbox" name="artist[]" value="Crosby, Stills &
Nash">Crosby, Stills & Nash
<br>
<input type="submit" name="submit" value="Select">
</form>
<?
}
// or display the selected artists
else
{
?>
<b>And here are your selections:</b>
<br>
<?
-----error script line should be here----------
for($count = 0; $count < sizeof($artist); $count++)
{
echo "<i>$artist[$count]</i><br>";
}
}
?>
Regards,
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]