FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


why is post not allowed on here





starfish2007
I have a form to email script onmysite so that people can send me there computer help questions but when i go to submit it it tells me that post is not allowed on this server why is this not allowed imeen the formpost methid is like one of the the most commin ways to send form data or is there something rong with my script on my site my site is computer-support.frih.net
ncwdavid
I have just looked at your site and the page where you enter in the details and the "action" of the form is "./". That does not go anywhere. That just pretty much brings you here: http://computer-support.frih.net/

You need to point it to the email script you made. Like this:
Code:
<form action="http://computer-support.frih.net/email.php" method="post">
<table>
    <tr>
      <td class="label"><label for="email">Your e-mail address</label></td>
      <td>
        <input type="text" name="email" id="email" value="" size="30">
        (a confirmation e-mail will be sent to this address)
      </td>
    </tr>

    <tr>
      <td class="label"><label for="body">please write your computer problem in here with as much information as possable</label></td>
      <td><textarea name="body" id="body" cols="70" rows="5">
              </textarea></td>
    </tr>
    <tr><td id="submit" colspan="2"><button type="submit">Send message</button></td></tr>
  </table>
</form>

That is all you have to do and the script will handle the data that was entered.
starfish2007
oh its not a html form its a php script thats should submit to its self here is the code of the hole thing
Code:
<?php
  $to='support@computer-support.frih.netί';
  $messageSubject='computer help problem';
  $confirmationSubject='your computer help problem  has bin reseaved';
  $confirmationBody="Thank you for visiting my site. \r\n  This message is just to confirm that your computer help problem has bin reseaved.  \r\n  I will respond to your problem as soon as possable. \r\n  Note if more then 2 days go by and you still have not heard from me please re-visit my site at \r\n  http://www.computer-support.frih.net and see if it has bin added to the list of commin  problems. \r\n  if it has not bin added to the list feel free to fill out my computer problem form again \r\n   computer-site Webmaster";
  $email='';
  $body='';
  $displayForm=true;
  if ($_POST){
    $email=stripslashes($_POST['email']);
    $body=stripslashes($_POST['body']);
    // validate e-mail address
    $valid=eregi('^([0-9a-z]+[-._+])*[0-9a-z]+@([-0-9a-z]+[.])+[a-z]{2,6}$',$email);
    $crack=eregi("(\r|\n)(to:|from:|cc:|bcc:)",$body);
    if ($email & $body & $valid & !$crack){
      if (mail($to,$messageSubject,$body,'From: '.$email."\r\n")
          & mail($email,$confirmationSubject,$confirmationBody.$body,'From: '.$to."\r\n")){
        $displayForm=false;
?>
<p>
  Your message was successfully sent.
  In addition, a confirmation copy was sent to your e-mail address.
  Your message is shown below.
</p>
<?php
        echo '<p>'.htmlspecialchars($body).'</p>';
      }else{ // the messages could not be sent
?>
<p>
  Something went wrong when the server tried to send your message.
  This is usually due to a server error, and is probably not your fault.
  We apologise for any inconvenience caused.
</p>
<?php
      }
    }else if ($crack){ // cracking attempt
?>
<p><strong>
  Your message contained e-mail headers within the message body.
  This seems to be a cracking attempt and the message has not been sent.
</strong></p>
<?php
    }else{ // form not complete
?>
<p><strong>
  Your message could not be sent.
  You must include both a valid e-mail address and a message.
</strong></p>
<?php
    }
  }
  if ($displayForm){
?>
<form action="./" method="post">
  <table>
    <tr>
      <td class="label"><label for="email">Your e-mail address</label></td>
      <td>
        <input type="text" name="email" id="email" value="<?php echo htmlspecialchars($email); ?>" size="30">
        (a confirmation e-mail will be sent to this address)
      </td>
    </tr>
    <tr>
      <td class="label"><label for="body">please write your computer problem in here with as much information as possable</label></td>
      <td><textarea name="body" id="body" cols="70" rows="5">
        <?php echo htmlspecialchars($body); ?>
      </textarea></td>
    </tr>
    <tr><td id="submit" colspan="2"><button type="submit">Send message</button></td></tr>
  </table>
</form>
<?php
  }
?>





mathiaus wrote:

Please use the code BBCode tags when pasting large amounts of code.
Code:
[code][/code]

mathiaus
Try changing the the form to action=""
starfish2007
sorry i did not know there was somthing spical to put code inside of i'll try what you suggested thanks
Related topics
Posting
why did "god" create "satan"
What can I do with C-Panel?
distributed computing
Can i put a link to a website to download music
great pics,can you reach the other bank of the rival
Robert Jordan
Website made for a school assessment
Xbox 360 vs PS3
OMG! Pres Clinton and the NSA Eavesdropped on US Calls!
COURT UPHOLDS EXPANDED U.S. WIRETAPPING POWERS
Are all the guys here depraved
I'm banned ! why?
Indian student shot dead in US
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.