newbie question

newbie question

am 03.04.2008 21:23:01 von sammyl

i started playing with php... and i get a delayed message with no
information from my form. my form has the correct post action.... what
am i doing wrong? I included both files... please help!

CONTACT.PHP



Maintanet Contact Us













|| Contact Us

































maxlength="100">

maxlength="80">

maxlength="12">




How did you hear about us?
size="35" maxlength="12">










value="Send Email!">




 







************************************************************ ***********************************
MAIL.PHP



$emailSubject = 'Online Contact';
$webmaster = 'email@email.com';

$emailField = $_POST['email'];
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$sizeField = $_POST['size'];
$referrerField = $_POST['referrer'];
$commentsField = $_POST['comments'];

$body = <<



Email: $email

Name: $name

Phone: $phone

Size: $size

Referrer: $referrer

Comments: $comments

EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webmaster, $emailSubject, $body, $headers);

$theresults = <<


Maintanet









Default
>
IT Solution Provider

|| Contact Us p>

Thanks for you inquiry, we will get back to
you shortly!


 


 



 





EOD;
echo "$theresults";

?>

Re: newbie question

am 04.04.2008 03:20:38 von Lars Eighner

In our last episode,
<610c7186-cd7c-44d2-a23f-6528344b8d95@e10g2000prf.googlegroups.com>,
the lovely and talented SammyL
broadcast on comp.lang.php:

> i started playing with php... and i get a delayed message with no
> information from my form. my form has the correct post action.... what
> am i doing wrong? I included both files... please help!

> CONTACT.PHP

>
>
>Maintanet Contact Us
>
>
>
>

>
>


>

>

Two BODY tags? This is an html problem, not a php question.

Your document is invalid. What browsers do with invalid documents is not
prescribed. Some of them will render the document as if it starts with the
second BODY tag --- there are no guarantees in error recovery.

You have two body elements. One contains an empty FORM element. The
other contains no FORM element. If a browser chooses to try to render this
invalid document, it will probably try to render one or the other, and
neither can post anything.

>

>
>


>

|| Contact Us


>

>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

> > maxlength="100">
>

> > maxlength="80">
>

> > maxlength="12">
>

>
>

>
>
How did you hear about us?
> size="35" maxlength="12">

>
>

>
>

>
>
>

>
>

> > value="Send Email!">
>

>

>

>

>

 


>

>
>


> ************************************************************ ***********************************
> MAIL.PHP


>
> $emailSubject = 'Online Contact';
> $webmaster = 'email@email.com';

> $emailField = $_POST['email'];
> $nameField = $_POST['name'];
> $phoneField = $_POST['phone'];
> $sizeField = $_POST['size'];
> $referrerField = $_POST['referrer'];
> $commentsField = $_POST['comments'];

> $body = << >



> Email: $email

> Name: $name

> Phone: $phone

> Size: $size

> Referrer: $referrer

> Comments: $comments

> EOD;

> $headers = "From: $email\r\n";
> $headers .= "Content-type: text/html\r\n";
> $success = mail($webmaster, $emailSubject, $body, $headers);

> $theresults = << >
>
>
>Maintanet
>
>

>
>

>
>
>
>
>
Default
>>
> IT Solution Provider
>

>

|| Contact Us > p>
>

Thanks for you inquiry, we will get back to
> you shortly!


>

 


>

 


>

>

 


>

>
>
> EOD;
> echo "$theresults";

> ?>
--
Lars Eighner usenet@larseighner.com
Countdown: 291 days to go.

Re: newbie question

am 04.04.2008 15:13:13 von sammyl

thanks! too overwhelmed and trying to learn s/t new.... thanks again!

On Apr 3, 9:20 pm, Lars Eighner wrote:
> In our last episode,
> <610c7186-cd7c-44d2-a23f-6528344b8...@e10g2000prf.googlegroups.com>,
> the lovely and talented SammyL
> broadcast on comp.lang.php:
>
>
>
> > i started playing with php... and i get a delayed message with no
> > information from my form. my form has the correct post action.... what
> > am i doing wrong? I included both files... please help!
> > CONTACT.PHP
> >
> >
> >Maintanet Contact Us
> >
> >
> >
> >
> >
> >


> >

> >
>
> Two BODY tags? This is an html problem, not a php question.
>
> Your document is invalid. What browsers do with invalid documents is not
> prescribed. Some of them will render the document as if it starts with the
> second BODY tag --- there are no guarantees in error recovery.
>
> You have two body elements. One contains an empty FORM element. The
> other contains no FORM element. If a browser chooses to try to render this
> invalid document, it will probably try to render one or the other, and
> neither can post anything.
>
>
>
> >

> >
> >


> >

|| Contact Us


> >

> >

> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >

> > > > maxlength="100">
> >

> > > > maxlength="80">
> >

> > > > maxlength="12">
> >

> >
> >

> >
> >
How did you hear about us?
> > size="35" maxlength="12">

> >
> >

> >
> >

> >
> >
> >

> >
> >

> > > > value="Send Email!">
> >

> >

> >

> >

> >

 


> >

> >
> >
> > ************************************************************ ***********************************
> > MAIL.PHP
> > > > $emailSubject = 'Online Contact';
> > $webmaster = 'em...@email.com';
> > $emailField = $_POST['email'];
> > $nameField = $_POST['name'];
> > $phoneField = $_POST['phone'];
> > $sizeField = $_POST['size'];
> > $referrerField = $_POST['referrer'];
> > $commentsField = $_POST['comments'];
> > $body = << > >



> > Email: $email

> > Name: $name

> > Phone: $phone

> > Size: $size

> > Referrer: $referrer

> > Comments: $comments

> > EOD;
> > $headers = "From: $email\r\n";
> > $headers .= "Content-type: text/html\r\n";
> > $success = mail($webmaster, $emailSubject, $body, $headers);
> > $theresults = << > >
> >
> >
> >Maintanet
> >
> >
> >
> >

> >
> >
> >
> >
> >
Default
>
> > IT Solution Provider
> >

> >

|| Contact Us > > p>
> >

Thanks for you inquiry, we will get back to
> > you shortly!


> >

 


> >

 


> >

> >

 


> >

> >
> >
> > EOD;
> > echo "$theresults";
> > ?>
>
> --
> Lars Eighner use...@larseighner.com
> Countdown: 291 days to go.