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 4 of 6 FirstFirst 123456 LastLast
Results 31 to 40 of 54

Thread: Please Help

  1. #31
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  2. #32
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Where would i put that though? When you post it tell me which code to post and then you can add it to the code.

  3. #33
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    addtag.php is the code we need
    Last edited by Colin-Roberts; 09-08-2006 at 02:19 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  4. #34
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    You would edit the post code so it parses the message before its submitted.

  5. #35
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    In addtag.php put

    PHP Code:
    function filter($message)
    {
    $bad_words explode(','"tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
      foreach (
    $bad_words as $naughty)
       {
      
    $message eregi_replace($naughty"****"$message);
       }
    return 
    $message

    then put
    PHP Code:
    $input "$message";
    $output filter($input);
    echo 
    $output
    Add me on msn, *Removed*

    A4AOwen (Forum Moderator) - Please do not post your personal information.
    Last edited by A4AOwen; 09-08-2006 at 05:52 PM.
    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  6. #36
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Someone add it to this please

    PHP Code:
    <?php

    $name 
    $_POST['name'];
    $website $_POST['website'];
    $message $_POST['message'];

    if(empty(
    $name) OR empty($message))
    {
    echo 
    "

    <script language='javascript'>

    alert('You need to fill out both of the form fields...');

    </script>
    "


    }
    else
    {

    echo 
    "

    <script language='javascript'>

    alert('Thanks for your message 
    $name...');

    </script>
    "

    $name htmlspecialchars($name);
    $message htmlspecialchars($message);
    $tag = ("<font size=\"1\" face=\"Verdana\">
    <b>
    $name</b>: $message </font><br><br>");


    $read fopen("content.txt""r");
    $contents fread($readfilesize('content.txt'));
    fclose($read);

    $write fopen("content.txt""w");
    fwrite($write"$tag $contents");
    fclose($write);
    }

    print 
    "<meta http-equiv=\"refresh\" content=\"0;index.php\">";

    // Copyright 2006 - 2007 PixelResources

    ?>

  7. #37
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    function filter($msg)
    {
    $bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pe a" );
    foreach ($bad_words as $naughty)
    {
    $msg = eregi_replace($naughty, "****", $msg);
    }
    return $msg;
    }
    you don't need the php codes fujit unless you were tryi ng to do php code box.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  8. #38
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    i think its this.
    PHP Code:
    <?php

    $name 
    $_POST['name'];
    $message $_POST['message'];

    if(empty(
    $name) OR empty($message))
    {
    echo 
    "

    <script language='javascript'>

    alert('You need to fill out both of the form fields...');

    </script>
    "
    ;

    }
    else
    {

    echo 
    "

    <script language='javascript'>

    alert('Thanks for your message 
    $name...');

    </script>
    "
    ;
    $name htmlspecialchars($name);
    $message htmlspecialchars($message);
    $tag = ("<font size=\"1\" face=\"Verdana\">
    <b>
    $name</b>: $message </font><br><br>");
    function 
    filter($name)
    {
    $bad_words explode(','"****,****,ect" );
    foreach (
    $bad_words as $naughty)
    {
    $msg eregi_replace($naughty"****"$name);
    }
    return 
    $name;
    }
    function 
    filter($message)
    {
    $bad_words explode(','"tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
    foreach (
    $bad_words as $naughty)
    {
    $msg eregi_replace($naughty"****"$message);
    }
    return 
    $message;
    }

    $read fopen("content.txt""r");
    $contents fread($readfilesize('content.txt'));
    fclose($read);

    $write fopen("content.txt""w");
    fwrite($write"$tag $contents");
    fclose($write);
    }

    print 
    "<meta http-equiv=\"refresh\" content=\"0;index.php\">";

    // Copyright 2006 - 2007 PixelResources

    ?>
    Last edited by Colin-Roberts; 09-08-2006 at 02:27 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  9. #39
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    PHP Code:
    <?php

    $name 
    $_POST['name'];
    $website $_POST['website'];
    $message $_POST['message'];

    if(empty(
    $name) OR empty($message))
    {
    echo 
    "

    <script language='javascript'>

    alert('You need to fill out both of the form fields...');

    </script>
    "


    }
    else
    {

    echo 
    "

    <script language='javascript'>

    alert('Thanks for your message 
    $name...');

    </script>
    "

    $name htmlspecialchars($name);
    $message htmlspecialchars($message);
    $tag = ("<font size=\"1\" face=\"Verdana\">
    <b>
    $name</b>: $message </font><br><br>");
    function 
    filter($tag)
    {
    $bad_words explode(','"tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
    foreach (
    $bad_words as $naughty)
    {
    $tag eregi_replace($naughty"****"$tag);
    }
    return 
    $tag;
    }
    function 
    filter2($contents)
    {
    $bad_words explode(','"tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
    foreach (
    $bad_words as $naughty)
    {
    $contents eregi_replace($naughty"****"$contents);
    }
    return 
    $contents;
    }
    $input $contents;
    $output filter($input);
    echo 
    $output;
    $input $tag;
    $output filter($input);
    echo 
    $output;

    $read fopen("content.txt""r");
    $contents fread($readfilesize('content.txt'));
    fclose($read);

    $write fopen("content.txt""w");
    fwrite($write"$tag $contents");
    fclose($write);
    }

    print 
    "<meta http-equiv=\"refresh\" content=\"0;index.php\">";

    // Copyright 2006 - 2007 PixelResources

    ?>
    Last edited by Fujitsu; 09-08-2006 at 02:37 PM.
    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  10. #40
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    fujitsu how can you filter the variable tag and content shouldnt it be name and message?

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Page 4 of 6 FirstFirst 123456 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
  •