PHP Classes

php POST and HTML mail

Recommend this page to a friend!

      Access user Class  >  All threads  >  php POST and HTML mail  >  (Un) Subscribe thread alerts  
Subject:php POST and HTML mail
Summary:How to adjust checkboxes to update with $_POST
Messages:1
Author:Anders Persson
Date:2006-08-28 03:23:15
 

  1. php POST and HTML mail   Reply   Report abuse  
Picture of Anders Persson Anders Persson - 2006-08-28 03:23:15
Hello everyone again !
I have successfully used Olafs excellent access_user class now for well over 2 weeks. The class gave me well needed "scripting" inspiration so I traveled down the php road and I found it a most useful and suprisingly versatilie scripting language. I have been able to extend the class (c style nonetheless :-) to suit my specific project needs and this has work out quiet well.
Now to my (I am sure) trivial question. Embedding php in HTML seems doable enough, not hard to see what needs to be done once there are a few examples to look at, but how do you for instance "check" a checkbox on an input page that previously has been checked and stored as a true value (i.e 1=true, 0=false or ""=false, ....you pick). The input field seems pretty easy :
<INPUT TYPE="text" NAME="name" SIZE="30" VALUE="<?php echo
(isset($_POST['name'])) ? $_POST['name'] : "" ?>">

the checkbox :
<input type=CHECKBOX name="architect" value="1" /> needs some work of course and I have tried a few grips on it w/o much success, this scenario is maybe something that someone has solved already ? Must appreciated if there is a html/php or php/html guru out there with a few smart tips . Thanks
Second question is short, but handy to knoq. Best way to send HTML mail from the php script. Sending mail , just text mail fine, but what is you want to spruce up the email a tad ?
Lots of thanks if anyone finds the time !!

Anders