So I am changing a php application for my company. I understand the basics and have been fine changing on my own until now. Basically the program has an admin side and a user side. A database is already set up that stores user information and I can add users/edit. What I want to do is have on the admin side a little script to select "available" or not available with a radio button, then on the user side it would echo a different image for "available" or "not available". Would this work or do I have to store the check boxed value in the database so it will keep the value?
Admin
<form name="f1" method="POST" action="SAVE TO DATABASE??">
<input class="no-check-border-win" type="checkbox" name="Availability" value="y" />Available<br/>
<input type="submit"/>
</form>
User
if((isset($_POST['Availability'])) && ($_POST['Availability'] == 'y'))
{
echo '<img src="http://mysite/image1.png" border=0>';
}
else
{
echo '<img src="http://mysite/image2.png" border=0>'
}