runnerjp
-
Posts
2,214 -
Joined
-
Last visited
Posts posted by runnerjp
-
-
hey all.... ok here it is... i have put a php file in to my website as a contact form
www.werun2win.com/contact.html
when you hit the send button its sends you to a page www.werun2win.com/feedback.php [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]
i want it to go to www.werun2win.com/thanks.html
here is script
*/
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;
$mailto = 'contact@werun2win.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;
$subject = "werun2win.com" ;
// the pages to be displayed, eg
//$formurl = "" ;
//$errorurl = "" ;
//$thankyouurl = "" ;
$formurl = "http://www.werun2win.com/contact.html" ;
$errorurl = "http://www.werun2win.com/error.html" ;
$thankyouurl = "http://www.werun2win.com/thanks.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>
-
ok so how do i get basic knolage of php i have had alook at site that tell u how to write it but i just wanna now how to upload it to my site
-
ok i have changed it to .php ( my index file) now what???
-
hey all
ok i have a php script that means i can have my visitors email me with comments
i have created a home page with a program called sitespinner and have uploaded the basics of it with my website server silverserve.co.uk and my current webpage is www.werun2win.com...with me so far
i have no idea how to put the php form onto my homepage that is currently on the net... i want to add it where the fake box in the left top hand corner is.... can anyone please help me :( -
yes it has php... right iget you upload the notpad file with code onto webhost i know how to do that but its part where you have to make it appear on you webpage... wat html do u put onto your webpage for this to appear :S
yes it has php... right iget you upload the notpad file with code onto webhost i know how to do that but its part where you have to make it appear on you webpage... wat html do u put onto your webpage for this to appear :S -
hey all i really really need your help please
im new to this php and at 1st i thought it was like adding javascript to your site but it aint
im useing a program caled sitespinner to make my site
what i wanan do is create a login passwerd word script so users can only view parts of site if they are registered
is there any programs which will install this onto my website because when i look at php it seems you add it to the host server yet how do u know hwere it will appear on you homepage :S:S:S
please please please help
php feedback form need help
in PHP Coding Help
Posted
it send me the email when you fill it in fine but when you click subit buttin you get redirected to www.werun2win.com/feedbackform.php which is not what i told it to do i said to redirect the person to a thankyou page i have made.. www.werun2win.com/thankyou so what i wrong :S
bellow is the php script i added to my directory on my host server
*/
// ------------- CONFIGURABLE SECTION ------------------------
// $mailto - set to the email address you want the form
// sent to, eg
//$mailto = "youremailaddress@example.com" ;
$mailto = 'contact@werun2win.com' ;
// $subject - set to the Subject line of the email, eg
//$subject = "Feedback Form" ;
$subject = "werun2win.com" ;
// the pages to be displayed, eg
//$formurl = "" ;
//$errorurl = "" ;
//$thankyouurl = "" ;
$formurl = "http://www.werun2win.com/contact.html" ;
$errorurl = "http://www.werun2win.com/error.html" ;
$thankyouurl = "http://www.werun2win.com/thanks.html" ;
$uself = 0;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) ) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Name of sender: $name\n" .
"Email of sender: $email\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper,
"From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;
?>