FORM MAIL, Its Great when it works! - Please help -

Discussion in 'Software' started by Tom Robo, Apr 2, 2006.

  1. Tom Robo

    Tom Robo Private E-2

    please understand, i am a novice with some elements of understanding about scripts.

    Hello,

    i have a .co.uk domain with STREAMLINE.NET. They host my site under the Widows 2003 server.
    My site has a CGI-BIN
    As the server is windows 2003, i have been told i cannot change file permissions i.e. to 755...etc

    I have been trying with loads i mean LOADS of scripts to get this working, below is the desired effect i need to happen:

    All i want to do is a user fills out a form, the form when clicked submit, the form data is send to an associated e-mail account. thats all

    The the scripts say they work on windows etc, but when testing time and time again they dont, ive used PHP,PL,ASP,CGI etc non work.
    Some of these scripts display the "thank-you" page, as if the script work but dont send any mail.
    Some say "you are not authorised to view this page"
    On questioning my host, they said all script to e-mail must have a from and to address to work, ive done just that no help. As well as this, they confirmed i cannot change the permissions.

    I think the prob is the permissions as the user cannot use the write permission the data is not beging sent.
    Of one example of the scripts i have used http://www.tele-pro.co.uk/scripts/contact_form/ loads of people say they work but they dont for me!

    and yes i am uploading the sripts in the correct mode using ftp

    If ive missed any info out, please let me no

    Any ideas would be great!

    Thanks a bundle in advance
     
  2. Raits

    Raits Private E-2

    Here's a simple one that works fine on my webserver.
    PHP:
    <!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
    <title>Nameless</title>
    </head>
    <body>
    <form method="POST">
    <b>To:</b><input type="text" name="to" /><br />
    <b>Subject:</b><input type="text" name="subject" /><br />
    <b>Text:</b><br />
    <textarea cols="40" rows="10" name="text"></textarea><br />
    <input type="submit" name="sub" value="Send" /><br />
    </form>
    <?php
    if(isset($_POST['sub']))
    {
    mail($_POST['to'], $_POST['subject'], $_POST['text']);
    echo
    "Should be sent?!";
    }
    ?>
    </body>
    </html>
    It doesn't need any premissions on the file, just upload it and run it.
     
  3. Tom Robo

    Tom Robo Private E-2

    Thanks it works great, also i found one just after i added this one to my site from www.bignosebird.com check-it-out!

    Thanks Again!
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds