matewe Posted June 5, 2007 Share Posted June 5, 2007 I am using Windows 2003 (Silly Me!) and am having a problem getting my contact form to work. I have literally tried a number of scripts that would normally work on Apache Servers. I don't know what i'm missing is there something extra i need to do to get my PHP Scripts to work. The php version is PHP Version 4.3.2...I am using FastHosts reseller account.... :'( :'( :'( :'( Quote Link to comment https://forums.phpfreaks.com/topic/54319-contact-forms-on-windows-2003/ Share on other sites More sharing options...
redarrow Posted June 5, 2007 Share Posted June 5, 2007 post ur code then? Quote Link to comment https://forums.phpfreaks.com/topic/54319-contact-forms-on-windows-2003/#findComment-268610 Share on other sites More sharing options...
matewe Posted June 5, 2007 Author Share Posted June 5, 2007 post ur code then? Its from Hotscripts and has been working well with Apache but witrh Windows 2003 there seems to be a problem... /* The Code Below*/ <?php $nasaadresa = "info@yuordomain.com"; //please replace this with your address $mail = $_POST['Email']; $porukaa = $_POST['Message']; $poruka = str_replace("\r", '<br />', $porukaa); //START OF THANKS MESSAGE //you may edit $thanks message. this is a message which displays when user sends mail from your site $thanks = " <p align='center'><br /> <b>Your message has sucessfully been sent!<br /></b> A copy of this message has been sent to your email address <br /><br /><b>($mail).</b><br />We will reply you soon as possible<br /></p>"; //do not edit nothing below this line until comment (ME) say so if you don't have skills with PHP //END OF THANKS MESSAGE if($_POST['submitform']) { $Name = $_POST['Name']; $Email = $_POST['Email']; $Message = $_POST['Message']; $require = $_POST['require']; $browser = $HTTP_USER_AGENT; $ip = $_SERVER['REMOTE_ADDR']; $dcheck = explode(",",$require); while(list($check) = each($dcheck)) { if(!$$dcheck[$check]) { $error .= "You have not filled this filed(s): <b>$dcheck[$check]</b>.<br>"; } } if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $Email))){ $error .= "Wrong e-mail.<br>This e-mail address <b>$Email</b> - is not valid. Please enter correct e-mail address."; } if($error) { echo $error; echo '<br><a href="#" onClick="history.go(-1)">Please try again.</a>'; } else { //START OF INCOMING MESSAGE (this message goes to your inbox) $message = " Name: $Name: E-mail: $Email Message: $Message ----------------------------- Browser: $browser IP: $ip "; //END OF INCOMING MESSAGE (this message goes to your inbox) $subject = "General Enquiry - Sent by $Name"; //subject OF YOUR INBOX MESSAGE sent to you $subject2 = "Your message has been sent"; //subject of OUTGOING MESSAGE - edit this //OUTGOING MESSAGE TEXT $message2 = "You have sent a message to Your Name: ----------------------------- From: $Name: E-mail: $Email Message: $Message ----------------------------- "; //END OF outgoing MESSAGE mail($nasaadresa,"$subject","$message","From: $Name <$Email>"); mail($Email,"$subject2","$message2","From: <$nasaadresa>"); echo "$thanks"; } } else{ //this is contact form down here, please edit if you know what are you doing... or the contact form may not be working. echo ' <form name="contactform" action="'.$PHP_SELF.'" method="post"> <input type="hidden" name="require" value="Name,Email,Message"></input> <label>Name</label> <input name="Name" type="text" id="Name" value="" /> <br /> <label>Email Address:</label> <input name="Email" type="text" id="Email" value="" /> <br /> <label>Message:</label> <textarea name="Message" cols="20" rows="5" id="Message"></textarea> <br /> <input type="submit" value="Send" name="submitform" id="submitbutton"></input> </form>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/54319-contact-forms-on-windows-2003/#findComment-268621 Share on other sites More sharing options...
redarrow Posted June 5, 2007 Share Posted June 5, 2007 set the action to the proper page name and try agin tell me if that solves the problam? <form name="contactform" action="'.$PHP_SELF.'" method="post"> Quote Link to comment https://forums.phpfreaks.com/topic/54319-contact-forms-on-windows-2003/#findComment-268625 Share on other sites More sharing options...
matewe Posted June 5, 2007 Author Share Posted June 5, 2007 set the action to the proper page name and try agin tell me if that solves the problam? <form name="contactform" action="'.$PHP_SELF.'" method="post"> Still does not work Quote Link to comment https://forums.phpfreaks.com/topic/54319-contact-forms-on-windows-2003/#findComment-268632 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.