[RESLOVED] Hey. Just realized that the problem was only a few typos in the code. Thanks anyway!
Hey. I have light knowledge of PHP and how it works, and this problem I'm having is really stumping me.
I'm trying to make a submit form for one of my sites and for some reason, when the e-mail comes in, all of the info won't be displayed.
Here's the form code I have on the page your you start the submit
<FORM action=submitform.php method=post>
<TABLE border=0 cellspacing=7 cellpadding=7 width="462">
<TBODY>
<TR>
<TD width="167"><strong>Your Name:</strong></TD>
<TD width="239">
<INPUT maxLength=256 size=26 name=name></TD></TR>
<TR>
<TD width="167"><strong>Title of Work:</strong></TD>
<TD width="239
<INPUT maxLength=256 size=26 name=worktitle value>
</TD>
</TR>
<TR>
<TD width="167">
<INPUT type=hidden name=Username><b>Type of Work:</b></TD>
<TD width="239">
<select size="1" name="worktype">
<option selected>Article</option>
<option>Poetry</option>
<option>Short Story</option>
</select>
</TD>
</TR>
<TR>
<TD width="167">
<STRONG>Your E-Mail Address:</STRONG>
</TD>
<TD width="239">
<INPUT maxLength=256 size=26 name=Email></TD></TR>
<TR>
<TD width="215" valign="top">
<b>Your Work:</b>
</TD>
<TD width="215">
<textarea rows="12" name="work" cols="32"></textarea>
</TD>
</TR>
<TR>
<TD colSpan=2 width="430">
<INPUT type=submit value="Submit Work" name=submit>
<INPUT type="reset" value="Reset" name="reset">
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
Here is the code of submitform.php
<?php
$youremail="****@.com"; // This is the address that the information submitted will be sent to.
$emailsubject="Writer's Lounge Submit Form"; // This will the email's subject
$from_who="Writers_Lounge_Submit@*****.org";
// Get the ip address of the person submiting the form.
if (getenv(HTTP_CLIENT_IP)){ $user_ip=getenv(HTTP_CLIENT_IP); }
else { $user_ip=getenv(REMOTE_ADDR); }
$name = $HTTP_POST_VARS['name'];
$worktitle = $HTTP_POST_VARS['worktitle'];
$worktype = $HTTP_POST_VARS['worktype'];
$email = $HTTP_POST_VARS['email'];
$work = $HTTP_POST_VERS['work'];
$mailbody="Senders Name:\n=================\n$name\n\n";
$mailbody.="Senders Work Title:\n=================\n$worktitle\n\n";
$mailbody.="Senders Work Type:\n=================\n$worktype\n\n";
$mailbody.="Senders E-mail:\n=================\n$email\n\n";
$mailbody.="Senders Work:\n=================\n$work\n\n";
$mailbody.="Senders Browser:\n=================\n$HTTP_USER_AGENT\n\n";
$mailbody.="Senders IP Number:\n=================\n$user_ip\n\n";
// Send form contents
mail("$youremail", "$emailsubject", "$mailbody", "From: $from_who");
?>
Here's the info I put into the form:
Name: Testing
Work Title: This Is a Test
Work Type: <select> Poetry
E-mail: testing@testing.com
Work: This is a test. Testing 123 Testing 123
And here is the e-mail I recieve:
[quote]Senders Name:
Testing
Senders Work Title:
This Is a Test
Senders Work Type:
Poetry
Senders E-mail:
Senders Work:
[/quote]
As you can see, the E-mail and Work are blank. 😕
Any help would be appriciated.