SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to re-create this form...

    Hi,

    I am re-designing a website for a client and they want to keep the same functionality as the form on this page...

    http://www.astercapital.com/brokers.asp

    Only thing is - I am not very good with programming anything. I am just a designer. My knowledge is limited to HTML/CSS.

    So my question is, what would be the best/easiest way to go about recreating this form? It first collects personal information and sends it by email to the client and then allows to access a protected page.

    Thanks very much in advance.

    Kit

  2. #2
    SitePoint Evangelist
    Join Date
    May 2006
    Location
    Denmark
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using PHP it would be quite easy. If we say that enroll.php is the page that processes the it could be sort of like this:

    Code PHP:
    <?php
    $db = new PDO('mysql:host=localhost;dbname=test', 'username', 'password');
     
    $stmt = $db->prepare('INSERT INTO table (name, firm, email, phone) VALUES(?, ?, ?, ?)');
    $stmt->execute(array($_POST['name'], $_POST['firm'], $_POST['email'], $_POST['phone']));
     
    $message = <<<EOF
    There has been a new enrollment.
     
    Name: {$_POST['name']}
    Firm: {$_POST['firm']}
    Email: {$_POST['firm']}
    Phone: {$_POST['phone']}
    EOF;
     
    $headers = 'From: [email]mailer@example.com[/email]' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
     
    mail('someone@example.com', 'New enrollment', $message, $headers);
    ?>

    Then you just need to fetch it somewhere else on the page where you can view all of them.

  3. #3
    SitePoint Member donniefitz2's Avatar
    Join Date
    Nov 2006
    Location
    Scottsdale, AZ
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are not a programmer, you could use this: http://wufoo.com/
    creator of Clover Content, a simple cms for existing websites


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •