Reply to Re: I need some help please with mail() & else if problems

Your name:

Reply:


Posted by Satya on 09/17/07 08:48

On Sep 17, 12:06 pm, shror <shahi...@gmail.com> wrote:
> I was testing to post a form and echo message according to the
> submitted box using else if and then mail() the box result to myself
> just for testing the procedure but i got some problems:
> 1# the text box value is not echoed to my result page
> 2# also the mail doesn't send me the text box value
> 3# the address bar view that the value entered was the correct value i
> entered
>
> so please help me
> the 111.htm form code is:http://www.beachtoursegypt.com/111.htm
>
> <form name="abcform" action="123.php">
> <input type="text" name="abc" size="40" value="choose between these:
> a, b, c">
> <input type="submit" name="submit" value="submit">
> </form>
>
> the 123.php code is:http://www.beachtoursegypt.com/123.php
>
> <body>
> <?php
> $i=1;
> while($i<=5)
> {
> echo "The number is " . $i . "<br />";
> $i++;
> }
>
> $x = $_POST['abc'];
> if ($x == "a")
> echo "A";
> else if ($x == "b")
> echo "B";
> else if ($x == "c")
> echo "C";
> else
> echo "nothing";
>
> // The message
> $message = "Line 1\nLine 2\nLine 3\n$i\n$i++\nthe switch result is:
> $x";
>
> // In case any of our lines are larger than 70 characters, we should
> use wordwrap()
> $message = wordwrap($message, 70);
> $from = "From: shror <sh...@shror.com>";
>
> // Send
> mail('me@isp', 'My Subject', $message, $from);
>
> ?>
> </body>
>
> the mail result I get is:
>
> Line 1
> Line 2
> Line 3
> 6
> 6++
> the switch result is:
>
> could anybody help me please and also I want to know how to use switch
> case because i tried to use them also but failed, so if any body have
> a working example for switch case with mail() this will really be
> great and appreciated.
>
> shror

I will only say use phpmailer package.
check here: http://satya61229.blogspot.com/2007/03/php-mail-scripts_17.html

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация