growkings Posted May 22, 2013 Share Posted May 22, 2013 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 Link to comment https://forums.phpfreaks.com/topic/278278-php-form-help/ 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? Link to comment https://forums.phpfreaks.com/topic/278278-php-form-help/#findComment-1431573 Share on other sites More sharing options...
growkings Posted May 22, 2013 Author Share Posted May 22, 2013 <?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 Link to comment https://forums.phpfreaks.com/topic/278278-php-form-help/#findComment-1431586 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"; Link to comment https://forums.phpfreaks.com/topic/278278-php-form-help/#findComment-1431671 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 = "[email protected]";$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' );} Link to comment https://forums.phpfreaks.com/topic/278278-php-form-help/#findComment-1431693 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.