How to add the Code of Submit Page?

Discussion in 'PHP' started by pankajdeoria, May 8, 2009.

  1. #1
    I have a Website for Text Sms & Message. I want to create a Page called as SubmitSms.php so that users can Submit their Sms to my website and that I receive either in my Website or in my mail id.

    Is the Code is Available for free? If Yes, Then Please Post the Code here so that I can Understand it more Clearly.
     
    pankajdeoria, May 8, 2009 IP
  2. Aaron Sustar

    Aaron Sustar Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The basic code for your website:
    <form action="script.php" method="post">
       SMS:<br />
       <textarea name="sms" cols="12" rows="4"></textarea><br />
       <input type="submit" name="submit" value="Send this message" />
    </form>
    Code (markup):
    The code of script.php:
    $headers = "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html; charset=utf-8\n";
    $headers .= "From: YourWebsite.com <info@yourwebsite.com>\n";
    mail("your.email@wherever.com", "Mail Subject (Title)", $_POST['sms'], $headers, "-r info@yourwebsite.com");
    Code (markup):
    This is basically everything you need ... Unless you want users to actually send those SMS messages from their cell phones to your website (that has a server with an integrated cell receiver) ... then things become more interesting. ;)

    However, hope this helps. :D
     
    Aaron Sustar, May 8, 2009 IP
  3. pankajdeoria

    pankajdeoria Banned

    Messages:
    314
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Thank You Sir. I will Try this Code.
     
    pankajdeoria, May 8, 2009 IP