Help reg

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help reg

    Pls i want a code that will prevent the use of some names in registering..pls help
    http://myfacepals.com
    MYFACEPALS SOCIAL NETWORKsigpic

    #2
    Set the blocked words or names in the $blockwords variable by inputting words between the " ",
    each word should be in lowercase letters,
    and each word should be separated by a comma ,
    example $blockwords="casino,badword";
    If a block word value appears in a form field form processing will be stopped.

    To use this code adjust the $blockwords value to the words you want to block,
    copy and paste all the script code (including the php start and end tags) to the very top of your Form1 form processing code above all other code.


    [HIDE-THANKS]
    PHP Code:
    $blockwords="casino,badword";

    if(!empty(
    $blockwords)&&!empty($_POST))
    {
    $useBlocks=explode(",",$blockwords);foreach($useBlocks as $blockWord)
    {foreach(
    $_POST as $Name=>$Value){$Value=trim($Value);$Value=strtolower($Value);
    if(!empty(
    $Value)&&strpos($Value,$blockWord)!==false){exit();}}}}?> 
    [/HIDE-THANKS]

    Last edited by bOrN2pwn; 02.01.10, 07:52.
    BakGat
    Code:
    class Counter {
    public:
      void Count();
      int  ReadDisplay();
    private:
      int  CurrentCount;
    };








    Back up my hard drive? How do I put it in reverse?
    My Community
    BakGat
    sigpic

    Comment


      #3
      //////// adedd on 05.01.2010 ////////
      huh lol i just noticed that i've posted code in wrong thread
      actually code would be usefull to
      Originally posted by makvanpor2000 View Post
      ...prevent the use of sAme names in registering...
      and would not
      Originally posted by makvanpor2000 View Post
      ...prevent the use of some names in registering...
      as requested lol
      Last edited by metulj; 05.01.10, 21:06.
      It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
      ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
      ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
      キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

      Comment


        #4
        $exists = mysql_num_row(mysql_query("SELECT * FROM table WHERE user='".$user."'"));

        if($exists>0)
        {

        echo "Username is already taken please try another!";

        exit;
        }

        Comment

        Working...
        X