Note that there are some explanatory texts on larger screens.

plurals
  1. POMy php form generates errors on bluehost server
    primarykey
    data
    text
    <p>I have created a contact form for my website. When I press the send button the form goes to a thank you page as it should. When the thank you page displays the url changes and a folder /info/ is added. see below:</p> <p><a href="http://www.projectrefresh.net/info/thankyou.html" rel="nofollow">http://www.projectrefresh.net/info/thankyou.html</a> </p> <p>After this happens all pages are broken as /info/ has been added and is not recognized.</p> <p>Contact form code:</p> <pre><code>&lt;form name="contact" method="POST" action="enquiryForm.php"&gt; &lt;p&gt;&lt;b&gt;Name&lt;/b&gt;&lt;br&gt; &lt;/tr&gt; &lt;tr&gt; &lt;input type="text" name="Name" size=40&gt; &lt;/tr&gt; &lt;tr&gt; &lt;p&gt;&lt;b&gt;Your Email&lt;/b&gt;&lt;br&gt; &lt;/tr&gt; &lt;tr&gt; &lt;input type="text" name="email" size=40&gt; &lt;/tr&gt; &lt;tr&gt; &lt;p&gt;&lt;b&gt;Company&lt;/b&gt;&lt;br&gt; &lt;/tr&gt; &lt;tr&gt; &lt;input type="text" name="Company" size=40&gt; &lt;/tr&gt; &lt;tr&gt; &lt;p&gt;&lt;b&gt;Subject&lt;/b&gt;&lt;br&gt; &lt;/tr&gt; &lt;tr&gt; &lt;input type="text" name="subject" size=40&gt; &lt;/tr&gt; &lt;tr&gt; &lt;p&gt;&lt;b&gt;Message&lt;/b&gt;&lt;br&gt; &lt;/tr&gt; &lt;tr&gt; &lt;textarea cols=40 rows=10 name="message"&gt;&lt;/textarea&gt; &lt;/tr&gt; &lt;tr&gt; &lt;p&gt;&lt;input type="submit" value=" Send "&gt; &lt;/tr&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>PHP Script:</p> <pre><code>&lt;?php $to="info@projectrefresh.net"; // what email address do you wish the email to be sent to? $subject="Enquiry from website"; // what subject do you want the email to have $sendto="thankyou.html"; // where do you want the visitor to be sent to afterwards? // // This is an UNSUPPORTED web form to email PHP script for usage by DiYhost.co.uk customers // $message = "This message has been sent from ".$_SERVER['HTTP_HOST']."\n\n\n"; while(list($var, $val)=each($HTTP_POST_VARS)){ // Get all variables $message .= "[".$var."]: ".$val."\n\n"; // build the message body } $message .= "\n\nThe person's IP address who sent this email is: ".$_SERVER['REMOTE_ADDR']; // see http://www.php.net/manual/en/function.mail.php mail($to, $subject, $message, "From: webmaster@".$_SERVER['SERVER_NAME']."\r\n" ."Reply-To: webmaster@".$_SERVER['SERVER_NAME']."\r\n" ."X-Mailer: PHP/" . phpversion()); // see http://www.php.net/manual/en/function.header.php header("Location: http://".$_SERVER['HTTP_HOST'] .dirname($_SERVER['PHP_SELF']) ."/".$sendto); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload