Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Oct 2008
    Posts
    353
    Tokens
    0

    Default

    Thank You So Much! +rep to you !
    Lol

  2. #12
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    That is so crap, you should -rep yourself now.

    PHP Code:
    echo "<h2>Enter a valid e-mail</h2>\n";
    $badinput "<h2>Email was not sent!</h2>\n";
    echo 
    $badinput;
    die (
    "Go back!"); 
    So when that is processed that will equal on the page[/PHP]

    Enter a valid e-mail
    Email was not sent!
    Go back!

    Would it not be easier to go

    PHP Code:
    echo "no valid email\nemail wasnt sent duh?\ngo back"
    Dont get me started about all of it please...

    Quote Originally Posted by Unloyal View Post
    Extremley simple...

    Contact.php
    ---------------
    PHP Code:
    <form method="post" action="Mail.php">
    <?
    $ipi 
    getenv("REMOTE_ADDR");
    $httprefi getenv ("HTTP_REFERER");
    $httpagenti getenv ("HTTP_USER_AGENT");
    ?>

    <input type="hidden" name="ip" value="<?php echo $ipi ?>" />
    <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
    <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />


    Your Name: <br />
    <input type="text" name="name" size="35" />
    <br />
    Your Email:<br />
    <input type="text" name="email" size="35" />
    <br /> <br />
    <br />
    Why you contacted us:<br />
    <select name="attn" size="1">
    <option value="General">General Feedback</option>
    <option value="Technical Support">Technical Support</option>
    <option value="Job Application">Job Application</option>
    <option value="Compliment">Compliment</option>
    <option value="Complaint">Complaint</option>
    </select>
    <br /><br />
    Message:
    <br />
    <textarea name="notes" rows="4" cols="40"></textarea>
    <br />
    <input type="submit" value="Send" />
    </form>
    Mail.php
    PHP Code:
    <?php

    $ip 
    $_POST['ip'];
    $httpref $_POST['httpref'];
    $httpagent $_POST['httpagent'];
    $visitor $_POST['name'];
    $visitormail $_POST['email'];
    $notes $_POST['notes'];
    $attn $_POST['attn'];

    // Stops someone attempting to do a simple inclusion hack.
    if (eregi('http:'$notes)) {
    die (
    "Lol you fail.");

    // End inclusion hack block
    // ------------------------------------------
    // Stops someone from entering an invalid email
    if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
    {
    echo 
    "<h2>Enter a valid e-mail</h2>\n";
    $badinput "<h2>Email was not sent!</h2>\n";
    echo 
    $badinput;
    die (
    "Go back!");
    }

    // End Email validation
    // ------------------------------------------
    // Makes sure all fields are filled in

    if(empty($visitor) || empty($visitormail) || empty($notes )) {
    echo 
    "<h2>Please fill in all fields</h2>\n";
    die (
    "Use back!");
    }

    // End inclusion hack block
    // ------------------------------------------
    // Gathers the information to be said in the email.

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

    $attn $attn ;
    $subject $attn;

    $notes stripcslashes($notes);

    $message $todayis [EST] \n
    -------------------------------------- \n
    Attention: 
    $attn \n
    -------------------------------------- \n
    Message: \n
    $notes \n
    -------------------------------------- \n
    From: 
    $visitor ($visitormail)\n
    -------------------------------------- \n
    Additional Info:  \n
    -------------------------------------- \n
    IP = 
    $ip \n
    -------------------------------------- \n
    Browser Info: 
    $httpagent \n
    -------------------------------------- \n
    Referral : 
    $httpref \n
    -------------------------------------- \n
    "
    ;

    $from "From: $visitormail\r\n";

    // End email info
    // ------------------------------------------
    // Sends off the email.

    mail("YOUR_EMAIL_HERE"$subject$message$from);
    ?>
    All you have to do is edit the options on Contact.php and put your email in Mail.php

    Simple.
    Hi, names James. I am a web developer.

  3. #13

    Default

    Isn't that exactly what I gave him/her? The minds of small children...

  4. #14
    Join Date
    Oct 2008
    Posts
    353
    Tokens
    0

    Default

    Quote Originally Posted by Jam-ez View Post
    Isn't that exactly what I gave him/her? The minds of small children...

    Maybe b u yurs didnt have EMAIL HERE LOL!
    Lol

  5. #15
    Join Date
    Oct 2008
    Posts
    353
    Tokens
    0

    Default

    Quote Originally Posted by Protege View Post
    That is so crap, you should -rep yourself now.

    PHP Code:
    echo "<h2>Enter a valid e-mail</h2>\n";
    $badinput "<h2>Email was not sent!</h2>\n";
    echo 
    $badinput;
    die (
    "Go back!"); 
    So when that is processed that will equal on the page[/PHP]

    Enter a valid e-mail
    Email was not sent!
    Go back!

    Would it not be easier to go


    Edited by Catzsy [Forum Super Moderator]: Please do not double post within the 15 minute editing period. Thanks.

    PHP Code:
    echo "no valid email\nemail wasnt sent duh?\ngo back"
    Dont get me started about all of it please...
    Also Ok diss him? But you cant IF U CANT EVEN CODE ONE!
    Last edited by Catzsy; 16-06-2009 at 10:28 PM.
    Lol

  6. #16
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    You're dissing him and your the one who completely failed at it, two people gave you a sufficient one and you didn't have a clue so so don't insult someone else when you can't do nothing for yourself.

    thanks

  7. #17
    Join Date
    Oct 2008
    Posts
    353
    Tokens
    0

    Default

    Well I cnt exacaly say ur post did the trick?
    Lol

  8. #18
    Join Date
    Jul 2004
    Location
    Scotland
    Posts
    17,702
    Tokens
    60,948
    Habbo
    Habbic

    Latest Awards:

    Default

    If you read it you'd understand it instead of being so lazy as to need the EXACT code posted.

    When someone gives you the exact code it is COMPLETELY useless as you're not going to learn nothing but to leech/copy and paste...

    It's not exactly rocket science. :rolleyes:

  9. #19
    Join Date
    Jun 2009
    Location
    Reading
    Posts
    10
    Tokens
    0

    Default

    Quote Originally Posted by Protege View Post
    That is so crap, you should -rep yourself now.

    PHP Code:
    echo "<h2>Enter a valid e-mail</h2>\n";
    $badinput "<h2>Email was not sent!</h2>\n";
    echo 
    $badinput;
    die (
    "Go back!"); 
    So when that is processed that will equal on the page[/PHP]

    Enter a valid e-mail
    Email was not sent!
    Go back!

    Would it not be easier to go

    PHP Code:
    echo "no valid email\nemail wasnt sent duh?\ngo back"
    Dont get me started about all of it please...
    It may not be the most efficient code in the world, but it does the job.

    The OP did not say that the code itself has to be efficient; so please, aslong as it works - get off my back.

  10. #20

    Default

    Quote Originally Posted by x-glow View Post
    Maybe b u yurs didnt have EMAIL HERE LOL!
    Actually.. it did:


Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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