What language is Dreamweaver FORMS ?

Discussion in 'HTML & Website Design' started by sindimatrix, Nov 18, 2008.

  1. #1
    I have just finished a website with dreamweaver using wysiwyg (I learned everything through tutorials) and on the tutorials it say I need a cgi script code from the host for the from to work but my host support (which is useless 90% of the time)is saying something about php as a newbie its confusing what I need to know is how do I get those forms to work? pHp ? or cgi-script code like dreamweaver recommends?
     
    sindimatrix, Nov 18, 2008 IP
  2. treggs

    treggs Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here is a php mail script for you hope you can understand it, php is the newer technology used these days cgi is old school, you get your form to submit to the page containing this the only changes you need to make are the fields which are at the top and bottom of the script and the email addresses used.

    if you need any help just pm me

    <?php

    $Name = $_POST['Name'];
    $Company = $_POST['Company'];
    $Address = $_POST['Address'];
    $Phone = $_POST['Phone'];
    $Email = $_POST['Email'];
    $Enquiry = $_POST['Enquiry'];



    if (eregi('http:', $notes)) {
    die ("Do NOT try that! ! ");
    }
    if(!$Email == "" && (!strstr($Email,"@") || !strstr($Email,".")))
    {
    echo "<h2>Use Back - Enter valid e-mail</h2>\n";
    $badinput = "<h2>Feedback was NOT submitted</h2>\n";
    echo $badinput;
    die ("Go back! ! ");
    }

    if(empty($Name) || empty($Email)) {
    echo "<h2>Use Back - fill in all fields</h2>\n";
    die ("Use back! ! ");
    }

    $todayis = date("l, F j, Y, g:i a") ;

    $attn = $attn ;
    $subject = $attn;

    $notes = stripcslashes($notes);


    $message = " $todayis [EST] \n
    Name: $Name \n
    Company: $Company \n
    Address: $Address \n
    Phone Number: $Phone \n
    Email: $Email \n
    Enquiry: $Enquiry \n



    ";

    $from = "From: ";


    mail("info@domain.co.uk", $subject, $message, $from);

    ?>
     
    treggs, Nov 18, 2008 IP
  3. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #3
    In my opinion, (I am not always right) CGI is old and out of fashion .
    The popular high class and web base languages are php, jsp , asp and asp.net .
    You need server environment to run these scripts .
    It is not hard to have the scripts to work , if you spend several days to learn .
     
    justinlorder, Nov 18, 2008 IP
  4. sindimatrix

    sindimatrix Active Member

    Messages:
    216
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    thanks for the replies so far I also forgot to mention that I am using dreamweaver 8
     
    sindimatrix, Nov 19, 2008 IP