Results 1 to 4 of 4

Thread: Error On Page

  1. #1
    Join Date
    Jan 2007
    Location
    Colorado
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Error On Page

    i cant freakin find it i know its somewhere in here but i just dont know where its ""Undetermined String Constant""



    <?php
    $myip = "$HTTP_SERVER_VARS[REMOTE_ADDR]";
    echo "<center><table width=50%><tr><td align=left>";
    if ($step == register) {
    if ((!$name) || (!$type) || (!$sex) || (!$fname) || (!$lname) || (!$email) || (!$password)) {
    echo "Please go back and fill in all fields.";
    echo "<br><br><center>[<a href=register.php>Back</a>]</center>";
    exit;
    }
    $any = @mysql_num_rows(mysql_query("SELECT * FROM `players` WHERE `ip`='$myip' AND `verified`='no'"));

    if (1 == 2) {
    if ($any >= 1) {
    echo "There is already an account logged on this IP that's pending verification. Please wait for it to be verified before you create an account of your own.";
    exit;
    }
    }


    if ($code1 != $code2) {
    echo "Invalid signup code. Please return to the registration page.";
    exit;
    }
    $name = substr("$name",0,16);
    $iptest = @mysql_num_rows(mysql_query("SELECT * FROM `bannedips` WHERE `ip`='$myip'"));
    if ($iptest >= 1) {
    echo "This IP has been banned from account creation.";
    exit;
    }
    if (($name == Webby) || ($name == Reddy) || ($name == Johan) || ($name == Dartarus) || ($name == Apothercy)) {
    echo "Can't pick that name, sorry.";
    exit;
    }
    $theirname = @mysql_fetch_array(mysql_query("SELECT * FROM `players` WHERE `username`='$name' AND `deleted`!='yes'"));
    if ($theirname['id']) {
    echo "The provided username is already in use.";
    exit;
    }
    $theiremail = @mysql_fetch_array(mysql_query("SELECT * FROM `players` WHERE `email`='$email'"));
    if ($theiremail['id']) {
    echo "You already have an account!";
    exit;
    }
    if (strlen($name) <=2) {
    print "Username must be at least 3 characters long.";
    include("foot.php");
    exit;
    }
    $space_check = substr("$name",0,1);
    if ($space_check == " ") {
    print "Username cannot start with a space.";
    include("foot.php");
    exit;
    }
    $poo = ctype_alpha("$space_check");
    if ($poo == false) {
    echo "Username must begin with a letter.";
    exit;
    }

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    if ((!$name) || (!$type) || (!$sex) || (!$fname) || (!$lname) || (!$email) || (!$password)) {
    Well, for one, you haven't defined any of these variables. You're trying to use them without proper defining methods.
    - Mike

  3. #3
    Join Date
    Jan 2007
    Location
    Colorado
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks but that didnt fix anything...

  4. #4
    Join Date
    Jan 2007
    Location
    Boulder City, Nevada
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Theres one error here:
    Code:
    if (1 == 2) {
    if ($any >= 1) {
    echo "There is already an account logged on this IP that's pending verification. Please wait for it to be verified before you create an account of your own.";
    exit;
    }
    }
    Missing a brace above, should be:

    Code:
    if (1 == 2) {
    if ($any >= 1) {
    echo "There is already an account logged on this IP that's pending verification. Please wait for it to be verified before you create an account of your own.";
    exit;
    }
    }
    }

Bookmarks

Posting Permissions

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