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 4 of 4

Thread: petition form

  1. #1
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default petition form

    Okay, i need a petition like SaveHarryPotter.co.uk, so people sign it and it shows u who signed it, can anyone give a link to 1/

    ty.


    something i can host on my site if possible ;]
    Last edited by ClubTime; 12-07-2007 at 01:12 PM.

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

    Latest Awards:

    Default

    Basicly change the text on a bog standard guest book and you have it.

  3. #3
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    I can code you one.
    James


    Connected to reality through a proxy server.

  4. #4
    Join Date
    Jan 2007
    Posts
    651
    Tokens
    0

    Default

    Sorry for the double post, but i made the script.

    Run this query.
    Code:
    CREATE TABLE `name` (
    `id` int(11) NOT NULL auto_increment,
    `name` varchar(30) NOT NULL default '',
    ) TYPE=MyISAM;
    Then save this as addname.php
    PHP Code:
    <?php //Written by James
    $name '$_POST[name]';
    mysql_connect("localhost""USER_NAME""PASSWORD") or die(mysql_error());
    mysql_select_db("DATABASE_NAME") or die(mysql_error());

    if(!
    $_POST[submit]){
    echo(
    '
    <form method="POST">
    Name:<input type="text" size="15" maxlength="50" name="name">
    <input type="submit" name="submit" value="Submit">
    '
    )
    }else{
    mysql_query("INSERT INTO names
    (name) VALUES('
    $name) "
    or die(
    mysql_error());
    }
    Then save this as viewnames.php
    PHP Code:
    <?php //Written by James

    mysql_connect("localhost""USER_NAME""PASSWORD") or die(mysql_error());
    mysql_select_db("DATABASE_NAME") or die(mysql_error());

    $result mysql_query("SELECT * FROM names")
    or die(
    mysql_error());  
    $row mysql_fetch_array($result);
    echo(
    ''.$row[name].'<br>');


    ?>
    Completely un-tested should work though.
    Last edited by Mr Macro; 12-07-2007 at 03:56 PM.
    James


    Connected to reality through a proxy server.

Posting Permissions

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