I created a form that sends the results to MySQL, then displays them on a page.
I am trying to figure out how to write code so that the email address will only be displayed if the user has selected "yes" and have it remain hidden if they select "no". (Like what happens when registering here)
I have tried various things, but being a newbie, I can't get anything to work. Any help is appreciated!
--- part of the form code:
<form method="post" action="<?php echo $PHP_SELF?>">
<input type=hidden name="id" value="<?php echo $row["id"] ?>">
<tr><th align="left">Email:</th><td><input type="Text" name="mail" size="60" maxlength="60" value="<?php echo $row["mail"] ?>"></td></tr>
<tr><th align="left">
Display email address?:</th><td><select name="display" value="<?php echo $row["display"] ?>"><option value="yes">Yes</option>
<option value="no">No</option></select> </td></tr>
----- part of the display code
echo "<tr bgcolor=#ffffff align=left>";
echo "<th>Date</th><td>$row[fdate] $row[half_day] $row[timezone]</td>";
echo "<th>Name</th><td>$row[firstname] $row[lastname] $row[mail]</td>";
echo "</tr>";
Thanks!
debber