growkings Posted May 22, 2013 Share Posted May 22, 2013 (edited) Hello i have a website and cant get my form to work hear is the code for my website i want to make a seperate php action form for my website that works with my code website is http://free.netai.net/ i have also attached my main page code index.html Edited May 22, 2013 by growkings Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted May 22, 2013 Share Posted May 22, 2013 how about you post up the not working php code and describe what the actual problem is? Quote Link to comment Share on other sites More sharing options...
growkings Posted May 22, 2013 Author Share Posted May 22, 2013 (edited) <?phpsession_start();$to = "Email Hear";$subject = "Contacts Comments";$name = $_REQUEST['name'];$nickname = $_REQUEST['nickname'];$email = $_REQUEST['email'];$message = $_REQUEST['message'];$moreinfo = $_REQUEST['moreinfo'];$message = "Name: ".$name."\n";$message .= "Nickname: ".$nickname."\n";$message .= "Email: ".$email."\n";$message .= "message: ".$message."\n";$headers .= "From: ".$email;$sent = mail($to, $subject, $message, $headers);if($sent){$_SESSION['their_name'] = $name;header('Location: thankyou.php');}else{header( 'Location: ../signup' );} hear it is i need it to work with Name Email\ website message it works with name and email Edited May 22, 2013 by growkings Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted May 22, 2013 Share Posted May 22, 2013 I assume you have a form field called website? If so you need to add it, plus your message is overwriting your original message: $name = $_REQUEST['name']; $nickname = $_REQUEST['nickname']; $email = $_REQUEST['email']; $website = $_REQUEST['website']; $user_message = $_REQUEST['message']; $moreinfo = $_REQUEST['moreinfo']; $message = "Name: ".$name."\n"; $message .= "Nickname: ".$nickname."\n"; $message .= "Email: ".$email."\n"; $message .= "Website: ".$website."\n"; $message .= "message: ".$user_message."\n"; Quote Link to comment Share on other sites More sharing options...
growkings Posted May 22, 2013 Author Share Posted May 22, 2013 thank you it works another question i have it ending in a php thankyou i want it to ya thank you page then return to the origanl page <?phpsession_start();$to = "aaronsmith727@gmail.com";$subject = "Contacts Comments";$name = $_REQUEST['name'];$email = $_REQUEST['email'];$website = $_REQUEST['website'];$user_message = $_REQUEST['message'];$moreinfo = $_REQUEST['moreinfo'];$message = "Name: ".$name."\n";$message .= "Nickname: ".$nickname."\n";$message .= "Email: ".$email."\n";$message .= "Website: ".$website."\n";$message .= "message: ".$user_message."\n";$headers .= "From: ".$email;$sent = mail($to, $subject, $message, $headers);if($sent){$_SESSION['their_name'] = $name;header('Location: thankyou.php');}else{header( 'Location: ../signup' );} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.