Hi all,

I'm new to the list and to PHP. I haven't bought a book as of yet but I've
found a number of resources that are getting me through the basics.

I am collecting data from a form. I've having no problems collecting the
data and printing it out.  But...

I have a form with check boxes with 4 options. See below.
************************************************************************

<input type=checkbox value=Investment name=investment>
<input type=checkbox value=Vacation Home  name=vacation>
<input type=checkbox value=Retirement Home  name=retirement>
<input type=checkbox value=Primary Home  name=primary>

************************************************************************

This form data is being sent off to a php page to get the values printed
out. See below:

****************************************************************************
**********************

print "Which best describes your reason for wanting to purchase land?<br>";
print "$investment<br> $investment2<br> $investment3<br> $investment4<br>"; 

****************************************************************************
**********************

The problem is if a check box is not checked a blank space gets printed out
which I don't want. Can someone show me how to use an if then statement
with the following stucture:

***********************************************************************
if $investment <not eqaul to a blank> then print $investment
***********************************************************************

I would use this structure for each of the variables in the checkboxes
above. I'm sure this could be done with arrays in some form or another but
since I'm new at this I would just as soon keep it simple for now and learn
more sophisticated techniques later.

Thanks so much,

Greg Landry
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to