I am trying to write a php code that will send the data to my email account. The checkbox is write in basic html. When I selected checkbox(es) and press submit botton it will show the checkbox that I selected or "YES" and those selection will be a hyperlink that will link to other page when they click it. How to I do that? Currently I just can list it as regular text not a hyperlink. Code are list below. Right now, when I press submit it just show the successfully submited and no listing of what I have checked on the checkbox.
PHP (This part is o.k I get it on my email)
$AAA=($_POST[AAA])?"AAA: Yes":"AAA: No";
$BBB=($_POST[BBB])?"BBB: Yes":"BBB: No";
$CCC=($_POST[CCC])?"CCC: Yes":"CCC: No";
$DDD=($_POST[CCC])?"DDD: Yes":"DDD: No";
I don't know, it works that's matter but I will try what you have suggest. You guys are expert, I just trial an error. if I know which one is good or work then I will not post my question. Thank you very much for your suggestion.
Originally posted by fozzy Something I don't get, why now simply use
This does the same thing as ISSET as far as I can tell and is shorter. Is there any difference?
Well, it works on my school server but not exactly work on business server. The error I get when I submitted is Notice: Undefined index: abc in d:\html\users\205014\webaddress\html\filename.php on line xx
this error I get is when I did not select the checkbox of abc which listed on html page. If I selected all the checkboxes then it works fine. Did anybody see what's wrong?
if (document.contact.abc.checked==false && document.contact.def.checked==false && document.contact.ghi.checked==false)
alert("Please select one checkbox);