LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Form not sending mail using includes... PHP (http://www.linuxquestions.org/questions/programming-9/form-not-sending-mail-using-includes-php-175235/)

cadkins 04-27-2004 04:15 PM

Form not sending mail using includes... PHP
 
I have a form that will send an email to me as well as an auto-responder. Typical stuff for right now.

If I test the form using the full path : http://www.mojotone.com/pages/emailPage.php
then everything works fine. But, if I just use an include it doesn't. Like http://www.mojotone.com/index.php?link=email

Here is the php code in text format

I have a feeling it something really stupid.

Thanks in advance.

david_ross 04-27-2004 04:24 PM

"it doesn't" is a bit broad. it doesn't what? include or send?

What does index.php look like?

david_ross 04-27-2004 04:26 PM

Ah - I see what I think you mean - it doesn't send right?

Try changing:
<form action="<? echo $_SERVER['PHP_SELF'];?>" method="post" name="contactus" id="contactus" onSubmit="return validateme(this)">

To:
<form action="/pages/emailPage.php" method="post" name="contactus" id="contactus" onSubmit="return validateme(this)">

cadkins 04-27-2004 07:38 PM

actually i just needed to change:
<form action="<? echo $_SERVER['PHP_SELF'];?>"

to:

<form action="<? echo $_SERVER['PHP_SELF']'.'?link=email';?>"


All times are GMT -5. The time now is 12:40 PM.