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 3 of 3
  1. #1
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default PHP/MySql help =D

    Hi, I posted with some tips on my php to email form, which is now succesfully working, but ive decided to go one step further, and try playing around with it, so maybe the data that is submitted goes into a MySQL database, this is my insertinto.php file that is the action for submit in the form:

    PHP Code:
     <?
    include ('config.php');
    if (isset(
    $_POST['submit']));
    $name $_POST['name'];
    $email $_POST['email'];
    $message $_POST['message'];
    $sample $_POST['sample'];

    $create mysql_query("
                            INSERT INTO `Apps` (`name`,`email`,`message`,`sample`
          ) VALUES (NULL '" 
    $name "','" $email "''" $message "''" $sample "');");
    if (!
    $create)
    {
        die(
    "There was a problem sending your application");
    } else
    {
        die(
    "Thank you for application, we aim to reply within 24 hours!!");
    }
    ?>
    To you, there'll be thousands of errors. id appreciate any help on getting this to work. Just some hinters would be nice, but if its all a load of crap then, Ill start again lol

    Thanks for anyone help, rep will be given where deserved and if possible!

    Thank you =D
    Callum
    Back for a while

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

    Latest Awards:

    Default

    Whats the error or you just want it to be made better?
    PHP Code:
    include 'confg.php';

    if( ! isset( 
    $_POST'Submit' ] ) )
    {
        exit();
    }

    $name $_POST'name' ];
    $email $_POST'email' ];
    $message $_POST'message' ];
    $sample $_POST'sample' ];

    $Query mysql_query/* Enter qurey here */ ); 

    if( 
    $Query )
    {
        echo 
    'Success';
    }
    else
    {
        echo 
    'No Success';

    Last edited by Protege; 08-03-2009 at 02:50 PM.
    Hi, names James. I am a web developer.

  3. #3
    Join Date
    Apr 2008
    Location
    Derby
    Posts
    4,668
    Tokens
    262

    Latest Awards:

    Default

    Ive fixed it now!
    Thanks alot anyway, Ill +Rep
    Back for a while

Posting Permissions

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