Advertisement Jump to content
Sign in to follow this  

[web] help needed with php mail form

This topic is 4905 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i wanted to create an application form on my web site so people could send in an example of their work and details etc. though at the moment it dosen't seam to be working. dose any one know whats wrong or have any tutorials on how to make one with a file field? my web page is: the php file is: <? $from = $_REQUEST['email'] ; $to = ''; $message = 'Name: ' $_REQUEST['name'], '\n AKA forum handel: ' $_REQUEST['username'], '\n what age you are:' $_REQUEST['age'], '\n gender: ' $_REQUEST['gender'], '\n what you would write about: ' $_REQUEST['what'], '\n whats skills i have: ' $_REQUEST['skills'], '\n web site:' $_REQUEST['website'], '\n where are you from: ' $_REQUEST['country'], '\n what time your normaly online: ' $_REQUEST['timeonline'], '\n url: ' $_REQUEST['example']; $attachment = $_REQUEST['exampleupload'] ; function mail_attachment ($from , $to, 'jointeam', $message, $attachment) header( "Location:" ); ?>

Share this post

Link to post
Share on other sites
I wouldn't use attachments... It's abusable if you don't put in some restrictions and is difficult to get working I hear. I *think* you might be able to do it using pear though if it's that important. Rather maybe just have them link to their online work? :)

In your script, I see you started to define a new function but didn't finish it. :p I'm not sure what you were doing there, but I rewrite a bit of what you did to get it more organized as well as making use of the mail() function to get it to work. You'd just have to make sure to change the html form to ask for a url rather than an attachment/upload.


$to = '';
$subject = 'Wanting to Join Our Team?';
$headers = "From: {$_REQUEST['email'}"];

$body = "Name: {$_REQUEST['name']},\n";
$body .= "AKA forum handel: {$_REQUEST['username']}\n";
$body .= "What age you are: {$_REQUEST['age']}\n";
$body .= "Your Gender: {$_REQUEST['gender']}\n";
$body .= "What you would write about: {$_REQUEST['what']}\n";
$body .= "What skills you have: {$_REQUEST['skills']}\n";
$body .= "What your web site is: {$_REQUEST['website']}\n";
$body .= "Where you are from: {$_REQUEST['country']}\n";
$body .= "What time you're normaly online: {$_REQUEST['timeonline']}\n";
$body .= "A link to your example: {$_REQUEST['example']}\n";

mail ($to, $subject, $body);



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!