RE: [PHP] Maybe an HTML prob?

This is a discussion on RE: [PHP] Maybe an HTML prob? within the PHP General forums, part of the PHP Programming Forums category; Aha! The secret handshake. That was it. Thanks to Brad and to David for pointing me to an invaluable online ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-29-2006
Frank Reichenbacher, Bio-Concepts, Inc.
 
Posts: n/a
Default RE: [PHP] Maybe an HTML prob?

Aha! The secret handshake. That was it. Thanks to Brad and to David for
pointing me to an invaluable online php resource.

Frank

> -----Original Message-----
> From: Brad Fuller [mailto:bfuller@cpacampaigns.com]
> Sent: Wednesday, November 29, 2006 12:42
> To: php-general@lists.php.net
> Subject: RE: [php] Maybe an HTML prob?
>
> if ($Permission = "Yes")
>
> should be
>
> if ($Permission == "Yes")
>
> It's one of those elusive little oversights we've all come across in our
> time. :)
>
> -B
>
> > -----Original Message-----
> > From: Frank Reichenbacher, Bio-Concepts, Inc. [mailto:frank@bio-con.com]
> > Sent: Wednesday, November 29, 2006 1:53 PM
> > To: php-general@lists.php.net
> > Subject: [php] Maybe an HTML prob?
> >
> > I am trying to pass the results of a form to a simple php mail()

> routine.
> > Everything works except the checkbox, Permission". No matter what state
> > the
> > checkbox is in, the php says it is whatever the "value" is set to on the
> > form. I must not be trying to pull the checkbox state correctly.
> >
> > I've tried several different means of evaluating $Permission, including
> > using empty() and isset(), but no matter what, $Permission always

> returns
> > whatever value is set in "value" on the form. In the case below, echo
> > $Permission returns "Yes" whether the box is checked or not.
> >
> > Here is the relevant code slightly doctored so as not to give a way a

> site
> > in early development:
> >
> > FORM:
> > <tr>
> > <td valign="top">
> > <input type="checkbox" name="Permission" value="Yes" tabindex="12"
> > checked></td>
> > <td><font face="Verdana" size="2">I grant permission to include the
> > above information on the website</font></td>
> > </tr>
> >
> > ACTION:
> > <?php
> > $to = $_POST["to"];
> > $FName = $_POST["FName"];
> > $MI = $_POST["MI"];
> > $LName = $_POST["LNAME"];
> > $Specialty = $_POST["Specialty"];
> > $Quals = $_POST["Quals"];
> > $Hospital = $_POST["Hospital"];
> > $Address1 = $_POST["Address1"];
> > $Address2 = $_POST["Address2"];
> > $Address3 = $_POST["Address3"];
> > $Address4 = $_POST["Address4"];
> > $Telephone = $_POST["Telephone"];
> > $Fax = $_POST["Fax"];
> > $New_First_Email = $_POST["New_First_Email"];
> > $OldEmail = $_POST["OldEmail"];
> > $Permission = $_POST["Permission"];
> > if ($Permission = "Yes") {
> > $Permission = "Yes";
> > } else {
> > $Permission = "No";
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0