Search found 6 matches

by phptomc
Thu Apr 15, 2004 10:35 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

<FORM METHOD="POST" ACTION="http://www.wine-pages.com/formmail.php"> <INPUT NAME="email_to" VALUE="tom@wine-pages.com" TYPE="HIDDEN"> <INPUT NAME="email_subj" VALUE="competition entry" TYPE="hidden"> <INPUT NAME="th...
by phptomc
Thu Apr 15, 2004 10:20 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

lets see where you build the form Is this the correct portion of the script? (thanks) <?php function get_form_data(){ global $REQUEST_METHOD; global $HTTP_POST_VARS; global $HTTP_GET_VARS; $vars = ($REQUEST_METHOD == 'GET') ? $HTTP_GET_VARS : $HTTP_POST_VARS; //strip spaces from all fields foreach ...
by phptomc
Thu Apr 15, 2004 9:40 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

whole code

As i say, I'm a real PHP/scripting novice, so not sure if you want the entire script (very long) posted here? Meantime, below is the whole of the main function of the script. Incidentally, I have just changed the checkbox to radio buttons, assigning values of "yes" and "no" depen...
by phptomc
Thu Apr 15, 2004 9:29 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

[quote="Bech100"]with checkboxes, a value is ONLY passed if the checkbox is selected. If you don't select it NOTHING is passed. You need some code like this to set $optin to something if it wasn't selected [syntax=php]if (!isset($optin)) { $optin = "No"; }[/syntax] Mark[/quote] M...
by phptomc
Thu Apr 15, 2004 8:10 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

value appears to be...

Thanks: the value appears to be "yes" when you check the box, and is not present when you don't. The form output that is emailed to me shows this is you DO tick the box: The aFromMail form submitted: Email subj...: join Xlocation....: Australia Optin........: yes and this if you DON'T: The...
by phptomc
Thu Apr 15, 2004 7:58 am
Forum: PHP - Code
Topic: help processing checkbox on html page
Replies: 12
Views: 2237

help processing checkbox on html page

Forgive a struggling PHP novice's question, but I have spent three days searching for the answer to this on forums and FAQs: I have installed a free php form-handling script called aformmail.php which processes web forms and does a sendmail, and can then send an autoresponder and add the form data t...