[PHP] Re: Forms In PHP
besure to have the to emails have only a , inbetween them. Example: $to = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]; etc Hope that helps :) -Brad www.BradTechnologies.com 99.9% Uptime 24/7 Support Packages as low as 3.50 p/month cPanel/PHP/mySQL www.BradTechnologies.com "Wil Hitchman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I created a web form in PHP and used a couple of email addresses. The only email address that worked when I submitted to the form (for testing purposes) was my Yahoo address. My AOL, hotmail and other work addresses did not work. Can someone tell me why? Thanks, Wil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Forms in PHP
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi all, > > Now I have a weird problem. I am using this code and can't understand why it > doesn't work. > When the script is run it returns a blank page, no error or done. > > here it is and any help would be appreciated. > > if(($type == book) or ($type == weapon)){ The above line is probably causing a problem. The values being compared are probably being treated as constants, as they are not enclosed in quotes. As you haven't declared the constants, there will be no match. Try if(($type == 'book') or ($type == 'weapon')){ > echo ""; > echo ""; > echo "Put in my shop"; > echo "Put into my Footlocker"; > echo "Discard this item"; > echo "Donate this item"; > echo ""; > echo ""; > > > > if(isset($submit)) > { > > if($sort == "shop") > { > echo "done" or die("Not!"); > } > } > } > elseif($type==food) Same problem as above > { > > echo ""; > echo "Feed my pet"; > echo "Put in my shop"; > echo "Put into my Footlocker"; > echo "Discard this item"; > echo "Donate this item"; > echo ""; > echo ""; > echo ""; > > > } > } > } > > Thanks for your time > Jennifer > -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forms in PHP
On Fri, Apr 12, 2002 at 09:36:42AM -0700, Andrew Chase wrote: : : foreach(array_keys($menu_options) as $option_value){ : $option_text = $menu_options[$option_value]; : echo '$option_text'; : } : : would just output : : $option_text : $option_text : $option_text : : which is probably not the desired output :) You need to use double quotes : for variable substitution. Unfortunately, if you want to maintain XHTML : compliance the tag attributes have to be double-quoted too... : : echo "$option_text\n"; Why stick with quotation marks? echo "$option_text\n"; -- Eugene Lee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Forms in PHP
>May I also suggest that you rewrite your echo statements as: > > echo 'Donate this item'; > >Vastly improves legibility. It's a problem, however, if you want to include a PHP variable in that echo statement, if you're populating a SELECT menu with a loop, for instance; $menu_options = array("A" => "Option 1", "B" => "Option 2", "C" => "Option 3"); foreach(array_keys($menu_options) as $option_value){ $option_text = $menu_options[$option_value]; echo '$option_text'; } would just output $option_text $option_text $option_text which is probably not the desired output :) You need to use double quotes for variable substitution. Unfortunately, if you want to maintain XHTML compliance the tag attributes have to be double-quoted too... echo "$option_text\n"; (Might as well add a "\n" at the end of the line for readability in the browser's 'View Source' window!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forms in PHP
Actually since everything is going to XML compliance you will not want to leave out the quotes since it is a very very structured language you could hang everything without your quotes :) Just because it works, doesn¹t mean it's the best way of doing it. Browsers try to parse html with the sloppiest coder in mind so that way they are really forgiving in code. So best practice.. Code like it's xhtml and you'll make everyone gasp and say what pretty html you have :) Rick "If you're going to be able to look back on something and laugh about it, you might as well laugh about it now." - Marie Osmond > From: Dave <[EMAIL PROTECTED]> > Date: Fri, 12 Apr 2002 08:33:36 +0200 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Forms in PHP > > >> >> May I also suggest that you rewrite your echo statements as: >> >> echo 'Donate this item'; >> >> Vastly improves legibility. > > > or just > > echo "Donate this item"; > > is there any common use how it should be coded or does it really make no > difference to forget the ""? i'm thinking here of old version of the > php-parser or old webservers which could missunderstand the code. just > to improve compatibility for further projects... > > > > > > > > -- > 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
Re: [PHP] Re: Forms in PHP
Hello: > echo "Donate this item"; > > is there any common use how it should be coded or does it really make no > difference to forget the ""? i'm thinking here of old version of the > php-parser or old webservers which could missunderstand the code. just > to improve compatibility for further projects... Well, I think to conform the XML standard, the atributtes must be enclosed with quotes. Best Regards. QaDRAM Studio, RAD Development for the WEB http://studio.qadram.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forms in PHP
> > May I also suggest that you rewrite your echo statements as: > > echo 'Donate this item'; > > Vastly improves legibility. or just echo "Donate this item"; is there any common use how it should be coded or does it really make no difference to forget the ""? i'm thinking here of old version of the php-parser or old webservers which could missunderstand the code. just to improve compatibility for further projects... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forms in PHP
On Friday 12 April 2002 09:19, Jennifer Downey wrote: > Actually after the submit button is clicked it returns a blank page. > "Jennifer Downey" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hi all, > > > > Now I have a weird problem. I am using this code and can't understand why > > it > > > doesn't work. > > When the script is run it returns a blank page, no error or done. > > > > here it is and any help would be appreciated. > > > > if(($type == book) or ($type == weapon)){ > > echo ""; > > echo ""; > > echo "Put in my shop"; > > echo "Put into my Footlocker"; > > echo "Discard this item"; > > echo "Donate this item"; > > echo ""; > > echo ""; You haven't given your submit button a name... > > > > > > > > if(isset($submit)) Thus this test fails and you get no output. May I also suggest that you rewrite your echo statements as: echo 'Donate this item'; Vastly improves legibility. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* It was all so different before everything changed. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Forms in PHP
Actually after the submit button is clicked it returns a blank page. "Jennifer Downey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > Now I have a weird problem. I am using this code and can't understand why it > doesn't work. > When the script is run it returns a blank page, no error or done. > > here it is and any help would be appreciated. > > if(($type == book) or ($type == weapon)){ > echo ""; > echo ""; > echo "Put in my shop"; > echo "Put into my Footlocker"; > echo "Discard this item"; > echo "Donate this item"; > echo ""; > echo ""; > > > > if(isset($submit)) > { > > if($sort == "shop") > { > echo "done" or die("Not!"); > } > } > } > elseif($type==food) > { > > echo ""; > echo "Feed my pet"; > echo "Put in my shop"; > echo "Put into my Footlocker"; > echo "Discard this item"; > echo "Donate this item"; > echo ""; > echo ""; > echo ""; > > > } > } > } > > Thanks for your time > Jennifer > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php