please I need help with my mail() the code is not executed

please I need help with my mail() the code is not executed

am 15.08.2007 08:52:35 von shror

Hi every body,
Please I need your help solving my php mail() function problem that
the code is appearing in the view source and I dont know whats the
problem where I am using another page tto test the php and its
executed very nice

The page have php code viewed : http://beachtoursegypt.com/booking-form.htm
where after submitting the form the data are sent to the confirmation
age where the php script lies there and its not executed

the page with the other php code example running is: http://beachtoursegypt.com/123.php


please help me in this urgent problem

Re: please I need help with my mail() the code is not executed

am 15.08.2007 09:33:11 von Dave Williams

shror wrote:
> Hi every body,
> Please I need your help solving my php mail() function problem that
> the code is appearing in the view source and I dont know whats the
> problem where I am using another page tto test the php and its
> executed very nice
>
> The page have php code viewed : http://beachtoursegypt.com/booking-form.htm
> where after submitting the form the data are sent to the confirmation
> age where the php script lies there and its not executed
>
> the page with the other php code example running is: http://beachtoursegypt.com/123.php

We cant really help without seeing the code. If php is executing there
might be trouble with the mail setup or your script may contain errors.
mail() returns true or false on completion so try

if(mail('','',''))
{
// confirm
}
else
{
// problem
}

--
Arjen
www.arjenkarel.nl

Re: please I need help with my mail() the code is not executed

am 15.08.2007 09:44:50 von MishinOleg

May be the permission for the script file do not allow to execute
it...

On Aug 15, 12:52 pm, shror wrote:
> Hi every body,
> Please I need your help solving my php mail() function problem that
> the code is appearing in the view source and I dont know whats the
> problem where I am using another page tto test the php and its
> executed very nice
>
> The page have php code viewed :http://beachtoursegypt.com/booking-form.htm
> where after submitting the form the data are sent to the confirmation
> age where the php script lies there and its not executed
>
> the page with the other php code example running is:http://beachtoursegypt.com/123.php
>
> please help me in this urgent problem

Re: please I need help with my mail() the code is not executed

am 15.08.2007 09:57:46 von shror

On Aug 15, 10:33 am, Arjen wrote:
> shror wrote:
> > Hi every body,
> > Please I need your help solving my php mail() function problem that
> > the code is appearing in the view source and I dont know whats the
> > problem where I am using another page tto test the php and its
> > executed very nice
>
> > The page have php code viewed :http://beachtoursegypt.com/booking-form.htm
> > where after submitting the form the data are sent to the confirmation
> > age where the php script lies there and its not executed
>
> > the page with the other php code example running is:http://beachtoursegypt.com/123.php
>
> We cant really help without seeing the code. If php is executing there
> might be trouble with the mail setup or your script may contain errors.
> mail() returns true or false on completion so try
>
> if(mail('','',''))
> {
> // confirm}
>
> else
> {
> // problem
>
> }
>
> --
> Arjenwww.arjenkarel.nl


I have tried your code and it gave me an error (//problem)
so what could be the problem now really am not sure whats wrong

you can check the page having the piece of code you gave me at this
link: http://beachtoursegypt.com/123.php
its code is here too:


$i=1;
while($i<=5)
{
echo "The number is " . $i . "
";
$i++;
}


if(mail('','',''))
{
// confirm
echo "confirm";
}

else
{
// problem
echo "error";
}

?>


thanks for your support

Re: please I need help with my mail() the code is not executed

am 15.08.2007 10:09:11 von shror

also the mail() I used here it is:

$FirstName = $_POST["FirstName"];
$FamilyName = $_POST["FamilyName"];
$name = "Full Name: " . $FirstName $FamilyName;
$Address = $_POST["Address"];
$Email = $_POST["Email"];
$Phone = $_POST["Phone"];
$City = $_POST["City"];
$Zipcode = $_POST=["Zipcode"];
$Otherdata = $_POST["Otherdata"];
$data = "Address: " . $Address . "E-mail: " . $Email \n . "Phone: " .
$Phone \n . "City: " . $City \n . "Zip code: " . $Zipcode \n . "Other
Data: " . $Otherdata;
$Adults = $_POST["Adults"];
$Children = $_POST["Children"];
$Infants = $_POST["Infants"];
$persons = "Adults: " . $Adults \n . "Children: " . $Children \n .
"Infants: " . $Infants \n;
$Arrdate = $_POST["Arrivaldate"];
$Depdate = $_POST["Departuredate"];
$Arrflight = $_POST["ArrivalFlight"];
$Depflight = $_POST["DepartureFlight"];
$time ="Arrival date: " . $Arrdate \n . "Departure date: " . $Depdate
\n . "Arrival Flight: " . $Arrflight \n . "Departure flight: " .
$Depflight \n;
$Singleroom = $_POST["Singleroom"'];
$Doubleroom = $_POST["Doubleroom"];
$Trebleroom = $_POST["Trebleroom"];
$MoreComments = $_POST["MoreComments"];
$needs ="Number of Single room(s): " . $Singleroom \n . "Number of
double room(s): " . $Doubleroom \n . "Number of tribleroom(s): " .
$Trebleroom;
$to = "me @ mydomain";
$from ="$Email";
$subject = "BeachTours Booking Form";
$message = "You recieved a new message from your website, \n its
details are as follows:\n\n $name \n $data \n\n $persons \n\n $time\n
\n $needs \n"
mail("$to","$subject","$message","$from\r\n" . "Reply-To: $from\r\n" .
"X-Mailer: www.BeachToursEgypt.com");
?>

Re: please I need help with my mail() the code is not executed

am 15.08.2007 13:58:59 von Jerry Stuckle

shror wrote:
> also the mail() I used here it is:
>
> > $FirstName = $_POST["FirstName"];
> $FamilyName = $_POST["FamilyName"];
> $name = "Full Name: " . $FirstName $FamilyName;
> $Address = $_POST["Address"];
> $Email = $_POST["Email"];
> $Phone = $_POST["Phone"];
> $City = $_POST["City"];
> $Zipcode = $_POST=["Zipcode"];
> $Otherdata = $_POST["Otherdata"];
> $data = "Address: " . $Address . "E-mail: " . $Email \n . "Phone: " .
> $Phone \n . "City: " . $City \n . "Zip code: " . $Zipcode \n . "Other
> Data: " . $Otherdata;
> $Adults = $_POST["Adults"];
> $Children = $_POST["Children"];
> $Infants = $_POST["Infants"];
> $persons = "Adults: " . $Adults \n . "Children: " . $Children \n .
> "Infants: " . $Infants \n;
> $Arrdate = $_POST["Arrivaldate"];
> $Depdate = $_POST["Departuredate"];
> $Arrflight = $_POST["ArrivalFlight"];
> $Depflight = $_POST["DepartureFlight"];
> $time ="Arrival date: " . $Arrdate \n . "Departure date: " . $Depdate
> \n . "Arrival Flight: " . $Arrflight \n . "Departure flight: " .
> $Depflight \n;
> $Singleroom = $_POST["Singleroom"'];
> $Doubleroom = $_POST["Doubleroom"];
> $Trebleroom = $_POST["Trebleroom"];
> $MoreComments = $_POST["MoreComments"];
> $needs ="Number of Single room(s): " . $Singleroom \n . "Number of
> double room(s): " . $Doubleroom \n . "Number of tribleroom(s): " .
> $Trebleroom;
> $to = "me @ mydomain";
> $from ="$Email";
> $subject = "BeachTours Booking Form";
> $message = "You recieved a new message from your website, \n its
> details are as follows:\n\n $name \n $data \n\n $persons \n\n $time\n
> \n $needs \n"
> mail("$to","$subject","$message","$from\r\n" . "Reply-To: $from\r\n" .
> "X-Mailer: www.BeachToursEgypt.com");
> ?>
>

$name = "Full Name: " . $FirstName . $FamilyName;
Missing ^

$to = "me @ mydomain";
^ ^ Remove spaces

There may be other errors - these I spotted right off the top.

Also, this form is insecure and can be use by spammers by header
injection. Always validate any information from the user!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: please I need help with my mail() the code is not executed

am 15.08.2007 14:13:54 von shror

On Aug 15, 2:58 pm, Jerry Stuckle wrote:
> shror wrote:
> > also the mail() I used here it is:
>
> > > > $FirstName = $_POST["FirstName"];
> > $FamilyName = $_POST["FamilyName"];
> > $name = "Full Name: " . $FirstName $FamilyName;
> > $Address = $_POST["Address"];
> > $Email = $_POST["Email"];
> > $Phone = $_POST["Phone"];
> > $City = $_POST["City"];
> > $Zipcode = $_POST=["Zipcode"];
> > $Otherdata = $_POST["Otherdata"];
> > $data = "Address: " . $Address . "E-mail: " . $Email \n . "Phone: " .
> > $Phone \n . "City: " . $City \n . "Zip code: " . $Zipcode \n . "Other
> > Data: " . $Otherdata;
> > $Adults = $_POST["Adults"];
> > $Children = $_POST["Children"];
> > $Infants = $_POST["Infants"];
> > $persons = "Adults: " . $Adults \n . "Children: " . $Children \n .
> > "Infants: " . $Infants \n;
> > $Arrdate = $_POST["Arrivaldate"];
> > $Depdate = $_POST["Departuredate"];
> > $Arrflight = $_POST["ArrivalFlight"];
> > $Depflight = $_POST["DepartureFlight"];
> > $time ="Arrival date: " . $Arrdate \n . "Departure date: " . $Depdate
> > \n . "Arrival Flight: " . $Arrflight \n . "Departure flight: " .
> > $Depflight \n;
> > $Singleroom = $_POST["Singleroom"'];
> > $Doubleroom = $_POST["Doubleroom"];
> > $Trebleroom = $_POST["Trebleroom"];
> > $MoreComments = $_POST["MoreComments"];
> > $needs ="Number of Single room(s): " . $Singleroom \n . "Number of
> > double room(s): " . $Doubleroom \n . "Number of tribleroom(s): " .
> > $Trebleroom;
> > $to = "me @ mydomain";
> > $from ="$Email";
> > $subject = "BeachTours Booking Form";
> > $message = "You recieved a new message from your website, \n its
> > details are as follows:\n\n $name \n $data \n\n $persons \n\n $time\n
> > \n $needs \n"
> > mail("$to","$subject","$message","$from\r\n" . "Reply-To: $from\r\n" .
> > "X-Mailer:www.BeachToursEgypt.com");
> > ?>
>
> $name = "Full Name: " . $FirstName . $FamilyName;
> Missing ^
>
> $to = "me @ mydomain";
> ^ ^ Remove spaces
>
> There may be other errors - these I spotted right off the top.
>
> Also, this form is insecure and can be use by spammers by header
> injection. Always validate any information from the user!
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

the problem is not in my php code but its that the script is not
executed and the php source is visible in my page and i dont know why
because other pages on the same place with this page are executed
correctly

Re: please I need help with my mail() the code is not executed

am 15.08.2007 14:19:17 von Jerry Stuckle

shror wrote:
> On Aug 15, 2:58 pm, Jerry Stuckle wrote:
>> shror wrote:
>>> also the mail() I used here it is:
>>> >>> $FirstName = $_POST["FirstName"];
>>> $FamilyName = $_POST["FamilyName"];
>>> $name = "Full Name: " . $FirstName $FamilyName;
>>> $Address = $_POST["Address"];
>>> $Email = $_POST["Email"];
>>> $Phone = $_POST["Phone"];
>>> $City = $_POST["City"];
>>> $Zipcode = $_POST=["Zipcode"];
>>> $Otherdata = $_POST["Otherdata"];
>>> $data = "Address: " . $Address . "E-mail: " . $Email \n . "Phone: " .
>>> $Phone \n . "City: " . $City \n . "Zip code: " . $Zipcode \n . "Other
>>> Data: " . $Otherdata;
>>> $Adults = $_POST["Adults"];
>>> $Children = $_POST["Children"];
>>> $Infants = $_POST["Infants"];
>>> $persons = "Adults: " . $Adults \n . "Children: " . $Children \n .
>>> "Infants: " . $Infants \n;
>>> $Arrdate = $_POST["Arrivaldate"];
>>> $Depdate = $_POST["Departuredate"];
>>> $Arrflight = $_POST["ArrivalFlight"];
>>> $Depflight = $_POST["DepartureFlight"];
>>> $time ="Arrival date: " . $Arrdate \n . "Departure date: " . $Depdate
>>> \n . "Arrival Flight: " . $Arrflight \n . "Departure flight: " .
>>> $Depflight \n;
>>> $Singleroom = $_POST["Singleroom"'];
>>> $Doubleroom = $_POST["Doubleroom"];
>>> $Trebleroom = $_POST["Trebleroom"];
>>> $MoreComments = $_POST["MoreComments"];
>>> $needs ="Number of Single room(s): " . $Singleroom \n . "Number of
>>> double room(s): " . $Doubleroom \n . "Number of tribleroom(s): " .
>>> $Trebleroom;
>>> $to = "me @ mydomain";
>>> $from ="$Email";
>>> $subject = "BeachTours Booking Form";
>>> $message = "You recieved a new message from your website, \n its
>>> details are as follows:\n\n $name \n $data \n\n $persons \n\n $time\n
>>> \n $needs \n"
>>> mail("$to","$subject","$message","$from\r\n" . "Reply-To: $from\r\n" .
>>> "X-Mailer:www.BeachToursEgypt.com");
>>> ?>
>> $name = "Full Name: " . $FirstName . $FamilyName;
>> Missing ^
>>
>> $to = "me @ mydomain";
>> ^ ^ Remove spaces
>>
>> There may be other errors - these I spotted right off the top.
>>
>> Also, this form is insecure and can be use by spammers by header
>> injection. Always validate any information from the user!
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> the problem is not in my php code but its that the script is not
> executed and the php source is visible in my page and i dont know why
> because other pages on the same place with this page are executed
> correctly
>

Does the file have a .php extension?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: please I need help with my mail() the code is not executed

am 15.08.2007 14:42:38 von shror

On Aug 15, 3:19 pm, Jerry Stuckle wrote:
> shror wrote:
> > On Aug 15, 2:58 pm, Jerry Stuckle wrote:
> >> shror wrote:
> >>> also the mail() I used here it is:
> >>> > >>> $FirstName = $_POST["FirstName"];
> >>> $FamilyName = $_POST["FamilyName"];
> >>> $name = "Full Name: " . $FirstName $FamilyName;
> >>> $Address = $_POST["Address"];
> >>> $Email = $_POST["Email"];
> >>> $Phone = $_POST["Phone"];
> >>> $City = $_POST["City"];
> >>> $Zipcode = $_POST=["Zipcode"];
> >>> $Otherdata = $_POST["Otherdata"];
> >>> $data = "Address: " . $Address . "E-mail: " . $Email \n . "Phone: " .
> >>> $Phone \n . "City: " . $City \n . "Zip code: " . $Zipcode \n . "Other
> >>> Data: " . $Otherdata;
> >>> $Adults = $_POST["Adults"];
> >>> $Children = $_POST["Children"];
> >>> $Infants = $_POST["Infants"];
> >>> $persons = "Adults: " . $Adults \n . "Children: " . $Children \n .
> >>> "Infants: " . $Infants \n;
> >>> $Arrdate = $_POST["Arrivaldate"];
> >>> $Depdate = $_POST["Departuredate"];
> >>> $Arrflight = $_POST["ArrivalFlight"];
> >>> $Depflight = $_POST["DepartureFlight"];
> >>> $time ="Arrival date: " . $Arrdate \n . "Departure date: " . $Depdate
> >>> \n . "Arrival Flight: " . $Arrflight \n . "Departure flight: " .
> >>> $Depflight \n;
> >>> $Singleroom = $_POST["Singleroom"'];
> >>> $Doubleroom = $_POST["Doubleroom"];
> >>> $Trebleroom = $_POST["Trebleroom"];
> >>> $MoreComments = $_POST["MoreComments"];
> >>> $needs ="Number of Single room(s): " . $Singleroom \n . "Number of
> >>> double room(s): " . $Doubleroom \n . "Number of tribleroom(s): " .
> >>> $Trebleroom;
> >>> $to = "me @ mydomain";
> >>> $from ="$Email";
> >>> $subject = "BeachTours Booking Form";
> >>> $message = "You recieved a new message from your website, \n its
> >>> details are as follows:\n\n $name \n $data \n\n $persons \n\n $time\n
> >>> \n $needs \n"
> >>> mail("$to","$subject","$message","$from\r\n" . "Reply-To: $from\r\n" .
> >>> "X-Mailer:www.BeachToursEgypt.com");
> >>> ?>
> >> $name = "Full Name: " . $FirstName . $FamilyName;
> >> Missing ^
>
> >> $to = "me @ mydomain";
> >> ^ ^ Remove spaces
>
> >> There may be other errors - these I spotted right off the top.
>
> >> Also, this form is insecure and can be use by spammers by header
> >> injection. Always validate any information from the user!
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> > the problem is not in my php code but its that the script is not
> > executed and the php source is visible in my page and i dont know why
> > because other pages on the same place with this page are executed
> > correctly
>
> Does the file have a .php extension?
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

yes
and I have uploaded it so many times but no solution
and the other page .php is running correctly as i stated before
so where is the problem i dont know

Re: please I need help with my mail() the code is not executed

am 15.08.2007 19:08:17 von Jerry Stuckle

shror wrote:
> On Aug 15, 3:19 pm, Jerry Stuckle wrote:
>> shror wrote:
===
>
> yes
> and I have uploaded it so many times but no solution
> and the other page .php is running correctly as i stated before
> so where is the problem i dont know
>

I looked at your code and didn't see anything obviously wrong (other
than numerous syntax errors). I uploaded it to my test system and after
fixing the syntax errors it parsed the file fine (of course it didn't
send the mail because I have the mail server disabled on this machine).

I do see you're using FrontPage. It does put some hooks into the
system, and I suspect this might be your problem - it somehow doesn't
think this is a PHP file. I'd recommend you follow up in a FrontPage
newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: please I need help with my mail() the code is not executed

am 16.08.2007 08:45:13 von chandoo

HI
Shror
i did't get u ,but may i know would u send the headers for it..
if not send the headers,and
still u did't
i will send u code ok

Re: please I need help with my mail() the code is not executed

am 16.08.2007 11:06:25 von shror

I have used in another pages the following code and its executed fine:
http://www.beachtoursegypt.com/123.php

if(mail('','',''))
{
// confirm
}
echo "confirm";
else
{
// problem
echo "error";
}

and the output was error but really i don't know how to fix this
problem may be i need to add php.ini file to enable the mail() on my
hosting account or what but the other problem is that i dont know how
to write the correct syntax for the php.ini

please help me in this terrible problem