i made a a php page where i also wrote the code for submitting the form. but it doesn't work. the code is given below.
| Code: |
|
<?php if(isset($_POST['upload'])) { $mail = "someone@example.net"; $location = "thanku.php"; $sub = $_POST['sub']; $name = $_POST['name']; $email = $_POST['email']; $request = $_POST['request']; $ip = $_SERVER['REMOTE_ADDR']; $mail_header .= "X-Sender-IP: $ip"; $mail_header .= "Content-Type: text/plain"; $mess = "Request \n\n" . "\n Name: $name \n" . "\n Email: $email \n" . "\n Request: $company \n"; mail($mail,$sub,$mail_header,$mess,"From: $name <$email>\n"); header ("Location: $location"); } else { ?><form action="" action="POST"> Subject: <input type="text" size="40" autocomplete="OFF" style="height: 20px;" class="input" name="sub" /><br /><br /> Name: <input type="text" size="40" autocomplete="OFF" style="height: 20px;" class="input" name="name" /><br /><br /> Email Address: <input type="text" size="36" autocomplete="OFF" style="height: 20px;" class="input" name="email" /><br /><br /> Request: <textarea name="request" rows="5" columns="40"></textarea><br /><br /> <input type="submit" name="submit" class="button" value="Submit" style="height: 20px;" onClick="return checkmail(this.form.email)" /> <input type="reset" class="button" value="Reset"></form> <?php } //end if ?> |
