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!


Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default Can someone make me a email form

    With the following;

    Habbo name
    Forum Name
    Email
    (Dropdown box) What job your applying for
    Experiance
    Why you want this job

    +50 rep
    Ross

  2. #2
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    Give me a few minutes to install the new version of EasyPHP and I'll get it done for you, I'll use JQuery to make it better

  3. #3
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    Here we go, sorry for the wait - the code is below and you can preview it at http://jspace.netai.net/email (sending disabled).
    form.php:
    HTML Code:
    <html>
    <head>
    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
    
    <script type='text/javascript'>
    // JQuery Start
     $(document).ready(function() {
    
     $('#form_button').click(function() {
        habboname = $('#form_habbo').val();
        forumname = $('#form_forum').val();
        email = $('#form_email').val();
        job = $('#form_job').val();
        xp = $('#form_xp').val();
        reason = $('#form_reason').val();
    
        $.post('send_mail.php', {habbo_name: habboname, forum_name: forumname, email: email, job: job, xp: xp, reason: reason}, function(returns) {
    
          if (returns == 'error_empty') {
           $('#form_warning').fadeIn(500).html("All fields are required.");
          }
          else {
           $('#form_warning').fadeIn(500).html("Application Sent");
           $('#form').fadeOut(500);
          }
    
    
          });
    
       });
    
     });
     // JQuery End
     </script>
     <style>input, textarea {text-align:center;}</style>
    </head>
    <body>
    <center>
    <div id='form_warning' style='text-align:center;border: 2px solid #E41B17; background:#F62217; width:30%; height:20px; font-weight:bold;color:#ffffff;display:none;'></div>
    <div id='form'>
    Habbo Name:<br /> <input type='text' id='form_habbo'> <br />
    Forum Name:<br /> <input type='text' id='form_forum'> <br />
    Email:<br /> <input type='text' id='form_email'> <br />
    What job are you applying for?<br /> <select id='form_job'>
    <option value='job1'>Job 1</option>
    <option value='job2'>Job 2</option>
    </select>   <br />
    Experience: <br /> <textarea id='form_xp' cols='30' rows='5'></textarea><br />
    Why do you want this job? <br /> <textarea id='form_reason' cols='30' rows='5'></textarea><br />
    <input type='submit' value='Send' id='form_button'>
    </div>
    </center>
    </body>
    </html>
    send_mail.php:
    PHP Code:
    <?php
    ///////////////////////////////////////////////
    // Enter your email inside the quotation marks
    $to "[email protected]";
    //////////////////////////////////////////////

    if (isset($_POST['habbo_name'], $_POST['forum_name'], $_POST['email'], $_POST['job'], $_POST['xp'], $_POST['reason'])) {
      
    $habbo $_POST['habbo_name']; 
    $forum $_POST['forum_name'];
    $email $_POST['email'];
    $job $_POST['job'];
    $xp $_POST['xp'];
    $reason $_POST['reason'];

    if (empty(
    $habbo)||empty($forum)||empty($email)||empty($job)||empty($xp)||empty($reason))
    echo 
    "error_empty";
    else {
     
    $message "
     Habbo Name: 
    $habbo
     Forum Name: 
    $forum
     Email: 
    $email
     Job they want: 
    $job
     Experience: 
    $xp
     Why they want the job: 
    $reason
     "
    ;
     
    mail($to"Application Form [$job]"$message"From: Application Form");
    }

    } else exit();


    ?>
    Last edited by Shibby-Shabs; 24-08-2011 at 10:53 AM.

  4. #4
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    If you need it with SMTP Authentication / anything let me know ^^

  5. #5
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    Sorry cant edit previous: Here's my quick intake. Didnt bother adding any validations because i take it its only going to certain people but i can if you like. Sloppy coding! This way does it through emailing yourself, from yourself. When the user sends the application, your email sends and email to whatever value is in $youremail (so you can send to a different email if you like). This is the only way i could think of sending the email if your email has SMTP Authentication!

    PHP Code:
    <?php

     
    // Mini Email Script by Sam of HbxF.
       
       
    include("Mail.php");
            if (isset(
    $_POST['submit'])) {
       
     
    $habboname $_POST['habboname'];
     
    $forumname $_POST['forumname'];
     
    $email =  $_POST['email'];
     
    $job $_POST['job'];
     
    $xp $_POST['xp'];
     
    $why $_POST['why'];
     
     
    $myemail ="EMAIL"// Your Email Here.
     
     //Go ahead and send the email
     
                                 
    $from "Your Name <[email protected]>";          // The email is sent to you from yourself. So insert your name and email here.
                                 
    $to $myemail;                                //  Your email
                                 
    $subject "Job Application";                                      // Email Subject
                                 
    $body "
                                    You have received an appplication from 
    $habboname,   \n
                                    
                                    Their email is: 
    $email
                                    Their Forum name is: 
    $forumname
                                    They want the 
    $job job

                                    Experience:
                                    
                                    
    $xp \n
                                    Why you hould hire them:

                                    
    $why\n\n


                                 "
    // The Message
                                 
                                 
           
    $host "mail.YOURHOST.com";   // Your SMTP host.
           
    $username1 "[email protected]";  // Your Username
           
    $password1 "PASSWORD"//Password
                                
    $headers = array ('From' => $from,
                                                  
    'To' => $to,
                                                  
    'Subject' => $subject);
                       
    $smtp Mail::factory('smtp',
                        array (
    'host' => $host,
                               
    'auth' => true,
                               
    'username' => $username1,
                               
    'password' => $password1));
     
                  
    $mail $smtp->send($to$headers$body);
     
                                if (
    PEAR::isError($mail)) {
                                echo(
    "<p>" $mail->getMessage() . "</p>");
                                
                                }
                                      
                                       die (
    "Application Sent!"); {
                                      
                                 
                                }
                 }                
                                
    ?>
      <html>
      
      <head>
      <title>Email Script</title>
      
      <form action='mail2.php' method='POST'>
             <table>
                    <tr>
                        <td>
                        Habbo Name:
                        </td>
                        <td>
                        <input type='text' name='habboname' value='<?php if (isset($_POST['submit'])) { echo $habboname; } else { } ?>' >
                        </td>
                    </tr>
                      <tr>
                        <td>
                        Forum Name:
                        </td>
                        <td>
                        <input type='text' name='forumname' value='<?php if (isset($_POST['submit'])) { echo $forumname; } else { } ?>'>
                        </td>
                    </tr>
                      <tr>
                        <td>
                        Email:
                        </td>
                        <td>
                        <input type='text' name='email'>
                        </td>
                    </tr>
                                <tr>
                        <td>
                        Which Job are you applying for:
                        </td>
                        <td>
                        <select name="job">
    <option value="Job1">Job1</option>
    <option value="Job2">Job2</option>
    <option value="Job3">Job3</option>
    </select>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        Your Experience:
                        </td>
                        <td>
                        <input type='text' name='xp'>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        Why should we pick you?:
                        </td>
                        <td>
                        <input type='text' name='why'>
                        </td>
                    </tr>

             </table>
             <br/><br/>
             <input type="submit" name="submit" value="Send Application">
    This is of course assuming your server has the Pear mail addon installed which is probably does. Can setup a quick demo too if needed!

  6. #6
    Join Date
    Mar 2009
    Location
    Western Australia
    Posts
    386
    Tokens
    0

    Default

    ^
    Mmm.. Now I have to learn more secure mail sending, I didn't validate email though I probably should of and know how to

  7. #7

    Default

    If you need a contact form quickly, I used to use Foxy Form. http://www.foxyform.com

    I hope that helps!


    You can now listen to film quotes! Click here to try it out!


Posting Permissions

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