+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How do I create a contact form if I don't have PHP installed ?

  1. #1
    aleca is offline x10Hosting Member aleca is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    2

    How do I create a contact form if I don't have PHP installed ?

    Hi, as far as I know, to be able to send a contact form, you need the PHP mail() function. As I don't have PHP installed, is there some other solution to do it ?

  2. #2
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: How do I create a contact form if I don't have PHP installed ?

    use a different language, like asp.

  3. #3
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: How do I create a contact form if I don't have PHP installed ?

    But then you need .net installed.

    Aleca, x10's servers do have both php and mono's .net installed.

  4. #4
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: How do I create a contact form if I don't have PHP installed ?

    Subtle

    I once heard of a way to send emails using javascript, but that's about as secure writing your email address, so probably slightly pointless
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  5. #5
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: How do I create a contact form if I don't have PHP installed ?

    There is no way of sending an email without use of a server. You may be able to use AJAX to connect to a server, but not by JavaScript alone. The best you can do without a server is a mailto form, which uses the basic maito syntax:
    HTML Code:
    <html>
      <body>
        <form method="get" action="mailto:youremailaddress@gmail.com"enctype="text/plain">
          <input type="text" name="subject" value="subject..."/><br />
          <textarea name="body" />Type your message here...</textarea><br />
          <input type="reset" value="Reset" />
          <input type="submit" value="Send" />
        </form>
      </body>
    </html>
    This creates a mailto link which opens up the clients email client to send the message, using the email you supplied in the form (ex: outlook).
    Last edited by Twinkie; 09-22-2009 at 06:50 PM.

  6. #6
    allofus is offline x10 Sophmore allofus is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Wetherby, West Yorkshire, England
    Posts
    183

    Re: How do I create a contact form if I don't have PHP installed ?

    or use an external smtp provider...
    Edit:
    I have a script that monitors file activity in a folder. If a file is accessed it triggers the script. THe files are accessed via an abyss webserver on the same machine and then the email is sent automatically.
    Edit:
    don't ask me why...
    Last edited by allofus; 09-22-2009 at 08:22 PM. Reason: Automerged Doublepost

  7. #7
    kkenny's Avatar
    kkenny is offline Lord Of The Keys kkenny is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    I REP THE BAY. (Bay Area, CA, USA)
    Posts
    1,950

    Re: How do I create a contact form if I don't have PHP installed ?

    If you can't use PHP MAIL, then using a SMTP method is your only other option that I know of. But unfortunately I don't know how to do it.
    kkenny - retired.
    -Became a Moderator/Staff Member on 4/23/08
    -Became Senior Mod on 8/28/08
    -Became Account Manager on 10/18/08
    -Left Staff and X10 in 2009.


  8. #8
    aleca is offline x10Hosting Member aleca is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    2

    Re: How do I create a contact form if I don't have PHP installed ?

    Thanks for all your suggestions but I barely know a little PHP, I won't dear approach ASP )

    I searched the web a little and discovered the remotely hosted forms. I have to choose between http://www.freedback.com and http://www.123contactform.com. Both are free, Freedback has some ads and 123ContactForm requires a backlink. I think one of them will save my day :D

  9. #9
    allofus is offline x10 Sophmore allofus is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    Wetherby, West Yorkshire, England
    Posts
    183

    Re: How do I create a contact form if I don't have PHP installed ?

    there is a phpform generator in the softaculous installer on x10.

    If you are hosting with x10 you have all you need to host this yourself.

    go to your cpanel and take a look at the installer software. The form generator is easy to use and you will maybe learn a few things from seeing the coding it provides.

  10. #10
    maattheeww is offline x10Hosting Member maattheeww is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    1

    Re: How do I create a contact form if I don't have PHP installed ?

    If you use X10 host then you can do a html form that mails it via php...



    Copy and paste below in notepad, save it as "sendresults.php"
    PHP Code:
    <?php
    //--------------------------Set these paramaters--------------------------

    // Subject of email sent to you.
    $subject 'form results'

    // Your email address. This is where the form information will be sent. 
    $emailadd 'youremail@yourdomain.com';

    // Where to redirect after form is processed. 
    $url 'http://www.yourdomain.com/confirmation.html'

    // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
    $req '0'

    // --------------------------Do not edit below this line--------------------------
    $text "results from form:\n\n"
    $space ' ';
    $line '
    '
    ;
    foreach (
    $_POST as $key => $value)
    {
    if (
    $req == '1')
    {
    if (
    $value == '')
    {echo 
    "$key is empty";die;}
    }
    $j strlen($key);
    if (
    $j >= 20)
    {echo 
    "Name of form element $key cannot be longer than 20 characters";die;}
    $j 20 $j;
    for (
    $i 1$i <= $j$i++)
    {
    $space .= ' ';}
    $value str_replace('\n'"$line"$value);
    $conc "{$key}:$space{$value}$line";
    $text .= $conc;
    $space ' ';
    }
    mail($emailadd$subject$text'From: '.$emailadd.'');
    echo 
    '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>
    Then your HTML form, I placed an example below of something you could do...

    HTML Code:
    <form action="http://www.yourdomain.com/sendresults.php" method="post">
    <input type="text" name="name">
    <input type="submit" value="Send">
    </form>
    Then you would click "send" it would send your form to your email, and redirect the user to "confirmation.html"

    If your server doesn't host php, you can use an x10 host to host the "sendresults.php" and host your html on your html site...

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. PHP Contact form
    By itradio in forum Programming Help
    Replies: 3
    Last Post: 05-10-2009, 11:13 PM
  2. php form
    By garrensilverwing in forum Programming Help
    Replies: 10
    Last Post: 04-27-2009, 09:09 PM
  3. Simple PHP Email Sending Form
    By dquigley in forum Programming Help
    Replies: 10
    Last Post: 12-13-2008, 02:33 PM
  4. Upload problem with my php form... Please help!
    By uplinked in forum Free Hosting
    Replies: 6
    Last Post: 12-12-2008, 09:13 AM
  5. need help with a Make contact form and send email in PHP
    By zynischen in forum Programming Help
    Replies: 2
    Last Post: 12-17-2007, 06:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers