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 9 of 9
  1. #1
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default Two Form Actions

    Is it possible to have two form actions?

    I want the form action to be
    "mailto:XX@XX?subject=XX", but I also want it to go to, ?action=submit

    Is this possible?


    Selling DJ/Habbo layout, more info here.


  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Well with most modern browsers mailto wont do anything anyway, so eaiest solution would just be cut that bit out all together. If you want mail functiaonlty just add mailing functionalty in to the form handler thats picking it up in the action=submit page

  3. #3
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    How can I make the form email everything to me?


    Selling DJ/Habbo layout, more info here.


  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Send it to ?action=whatever and use the PHP function mail().

  5. #5
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Simon, would this work?

    PHP Code:
    <?php

    $to 
    "[email protected]";
    $subject "$name";

    $message "Name: $name<br>
    Job: 
    $job<br>
    Why: 
    $wwspy<br>
    about
    $aboutme<br>
    Email: 
    $email<br>
    Age: 
    $age<br>
    IP: 
    $ip";

    $headers "MIME-Version: 1.0" "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" "\r\n";

    mail($to,$subject,$message,$headers);
    ?>


    Selling DJ/Habbo layout, more info here.


  6. #6
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Nevermind, I got it.


    Selling DJ/Habbo layout, more info here.


  7. #7
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    I wouldn't be using <br> for something a line break, people mightn't be using HTML capable email browsers. Just use \n.

  8. #8
    Join Date
    Jan 2007
    Location
    England, Uk, World, Universe,
    Posts
    1,012
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by adamFTW View Post
    Simon, would this work?

    PHP Code:
    <?php
    $message 
    $_POST['message'];
    $wwspy $_POST['wwspy'];
    $job $_POST['job'];
    $aboutme $_['aboutme'];
    $email $_['email'];
    $age $_POST['age'];
    $ip $_SERVER['REMOTE_ADDR'];
    $to "[email protected]";
    $subject "$name";
    $message "Name: $name<br>
    Job: 
    $job<br>
    Why: 
    $wwspy<br>
    about
    $aboutme<br>
    Email: 
    $email<br>
    Age: 
    $age<br>
    IP: 
    $ip";
    $headers "MIME-Version: 1.0" "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" "\r\n";

    mail($to,$subject,$message,$headers);
    ?>
    try that
    my sig ran away,

  9. #9
    Join Date
    Jan 2007
    Location
    England, Uk, World, Universe,
    Posts
    1,012
    Tokens
    0

    Latest Awards:

    Default

    Edit: just noticed a code error

    PHP Code:
    <?php
    $message 
    $_POST['message'];
    $wwspy $_POST['wwspy'];
    $job $_POST['job'];
    $aboutme $_POST['aboutme'];
    $email $_POST['email'];
    $age $_POST['age'];
    $ip $_SERVER['REMOTE_ADDR'];
    $to "[email protected]";
    $subject "$name";
    $message "Name: $name<br>
    Job: 
    $job<br>
    Why: 
    $wwspy<br>
    about
    $aboutme<br>
    Email: 
    $email<br>
    Age: 
    $age<br>
    IP: 
    $ip";
    $headers "MIME-Version: 1.0" "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" "\r\n";

    mail($to,$subject,$message,$headers);
    ?>
    my sig ran away,

Posting Permissions

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