values won't pass -- full code

PHP File for testing:
[php]<?php

$to = "[email protected]";
$subject = $_REQUEST[‘natureofinquiry’];
$message = $_POST[‘message’] ;
$from = "[email protected]";
$headers = “From:” . $from;

$send = mail($to, $subject, $message, $headers) ;

if($send && ($body != “”)){

header( "Location: http://www.tristatecasinoparties.com/thankyou.htm" ) ; }

else

{ header( “Location: http://www.tristatecasinoparties.com/problem.htm” ) ; }

?>[/php]

Email is sending but only with hardcoded values. No values from form are passing to php file. Helpdesk says server is ok. What am I missing?

so if you you try

[php]
$to = $_POST(‘to’);
or
$to = $_REQUEST(‘to’);
[/php]

it wont work?

My HTML FORM:

		     <FORM action="mailtest1.php?mailform" name="mailform" method="POST" enctype="text/plain" onSubmit="return checkForm(this);">



                   TEXTAREA name="message" cols="30" rows="6" class="field" wrap="VIRTUAL"></TEXTAREA>

                           <INPUT type="submit" name="submit" value="Send Email" class="button">
                           <INPUT type="reset" name="reset" value="Clear Form" class="button">
</FORM>
		

Forum wouldn’t let me post complete form, so is one field I’m tesing with…

Wilson, thanks for looking…
Correct, the POSTed variable from my form woud be ‘emai’.
So, $to = $_POST(‘email’);or $to = $_REQUEST(‘email’); leaves $to empty. My values are not passing nd no one seem to know why…

it seems that when you add enctype=“text/plain” to your html form it wont work try removing it and let me know

made no difference.

I sent you a private message
let me help you thru teamviewer

Thx all for your help.
Resolution:
In the form tag,

<FORM action="contactus.php" name="mailform" method="POST" enctype="multipart/form-data" onSubmit="return checkForm(this);">
I originally had “enctype=‘text/plain’” but got no values passed. As soon as I changed to current setting, values passed fine. The suggestion that it might be the enctype setting came from Wilson382-- thanks

im glad you made it work

i was researching about POST and some people were saying is buggy sometimes
i always use GEt unless im sending sentive information or bulk of information

Sponsor our Newsletter | Privacy Policy | Terms of Service