+ Reply to Thread
Results 1 to 3 of 3

Thread: Invitation script

  1. #1
    Jaan Guest

    Invitation script

    This simple scrips allows you to send invitations from your site..

    Code:
    <?php
    // Gather info into variables
    $email $_REQUEST['email'];
    $message $_REQUEST['message'];
    $youremail $_REQUEST['youremail'];
    $message2 "YourMessageHere!";

    // If $email is not set, $message is empty so as $youremail, then show the form
    if(!isset($email) && empty($message) && empty($youremail)){
    echo 
    "<form action='' method='post'>"
        
    ."<font>Invite your friends</font><br><br>"
        
    ."<font><b>Email: </b> <input type='text' name='email' size='30'><br>"
        
    ."<font><b>Your email: </b><input type='text' name='youremail' size='30'><br>"
        
    ."<font><b>Message: </b><br><textarea name='message' cols='30' rows='5'></textarea><br>"
        
    ."<input type='submit' value='Invite'>";
    }
    // If $youremail is empty then show the error
    elseif(empty($youremail)){
    die(
    "Please enter your email!");
    }
    // If $message is empty then show the error
    elseif(empty($message)){
    die(
    "Please enter your message!");
    //If everything is okay let's send our invitation
    }else{
    $send mail($email"Invitation"$message."

    $message2"
    "From: $youremail");
    // If we can not send this email let's show the error
    if(!$send){
    echo 
    "Can not send your invitation!";
    }
    // If this invitation was sent then let's show that "Invitation sent" message
    else{
    echo 
    "Invitation sent!";
    }
    }

    ?>
    I hope you like it..
    Regards Jaan
    Last edited by Jaan; 03-22-2007 at 11:29 AM.

  2. CODECALL Circuit advertisement

     
  3. #2
    Jordan Guest
    Nice post, thank you Jaan.

  4. #3
    Jaan Guest
    you're welcome m8

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Invitation for Open Source Project
    By rcbandit in forum Java Help
    Replies: 3
    Last Post: 07-19-2011, 10:30 AM
  2. Invitation for Open Source Project
    By rcbandit in forum Member Software/Projects
    Replies: 5
    Last Post: 04-27-2011, 04:15 AM
  3. Invitation for Open Source Project
    By rcbandit in forum C and C++
    Replies: 1
    Last Post: 03-18-2011, 06:09 PM
  4. Request your Google Wave Invitation :-)
    By Orjan in forum The Lounge
    Replies: 7
    Last Post: 11-26-2009, 06:00 PM
  5. Wedding invitation / greeting card preview script
    By PhillipH in forum MarketPlace
    Replies: 0
    Last Post: 10-07-2008, 05:42 AM

Tags for this Thread

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