Keep getting this error! (registration page error) menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    antonp93's Avatar Member
    Reputation
    3
    Join Date
    Apr 2007
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Keep getting this error! (registration page error)

    So, I'm using Kaels website, which gives me a account reg page. (which site doesnt? ^^)
    Anyway, after setting it up, I can't get why I'm getting this error! I'm not a pro at theese kind of things, so I though I could ask those who are?

    Here's almost whole code, I get a error on the red highlighted, (line25).
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <?php
    if($_POST)
    {
        $con = mysql_connect("localhost", "root", "ascent");
        if(!$con)
            $msg = "Unable to create a Database connection.";
        if($con)
        {
            mysql_select_db("LOGON-CHAR-DATABASE", $con);
            $user = $_POST['login'];
            $pass = $_POST['password'];
            $email = $_POST['email'];
            $pack = $_POST['formselect1'];
    
            if(!$user)
                $msg = "Please fill out your Username.";
            else if(!$pass)
                $msg = "Please fill out your Password.";
            else if(!$email)
                $msg = "Please fill out your E-Mail Address.";
            else
            {
                $check = mysql_query("SELECT login FROM accounts WHERE login=\"".$user."\" LIMIT 1", $con);
                if(mysql_numrows($check) > 0)
                    $msg = "This account already exists.";
                else
                {
                    $query = "INSERT INTO accounts (login, password, email, flags) VALUES ('" . mysql_real_escape_string($user) . "', '" . mysql_real_escape_string($pass) . "', '" . mysql_real_escape_string($email) . "', '" . mysql_real_escape_string($pack) . "');";
    
                    if(!mysql_query($query, $con))
                        $msg = "Creation of ".$user." has failed.";
                    else
                        $msg = "Account ".$user." has been created.";
                }
            }
            @mysql_close($con);
        }
    }
    ?>
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <title>Account Creation</title>
    
    <style type="text/css">
    /*----------Text Styles----------*/
    .ws6 {font-size: 8px;}
    .ws7 {font-size: 9.3px;}
    .ws8 {font-size: 11px;}
    .ws9 {font-size: 12px;}
    .ws10 {font-size: 13px;}
    .ws11 {font-size: 15px;}
    .ws12 {font-size: 16px;}
    Anything I'm doing wrong? :/ Would really appreaciate some help here!
    tell me if I'm doing something else rong aswell.

    (You can check for yourself at cachewow.servegame.org
    urs,
    Antonp93 - pew.
    Last edited by antonp93; 03-30-2009 at 10:22 AM. Reason: added linkz :)

    Keep getting this error! (registration page error)
  2. #2
    Algorithm's Avatar Member
    Reputation
    175
    Join Date
    Mar 2008
    Posts
    395
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by antonp93 View Post
    So, I'm using Kaels website, which gives me a account reg page. (which site doesnt? ^^)
    Anyway, after setting it up, I can't get why I'm getting this error! I'm not a pro at theese kind of things, so I though I could ask those who are?

    Here's almost whole code, I get a error on the red highlighted, (line25).
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <?php
    if($_POST)
    {
        $con = mysql_connect("localhost", "root", "ascent");
        if(!$con)
            $msg = "Unable to create a Database connection.";
        if($con)
        {
            mysql_select_db("LOGON-CHAR-DATABASE", $con);
            $user = $_POST['login'];
            $pass = $_POST['password'];
            $email = $_POST['email'];
            $pack = $_POST['formselect1'];
    
            if(!$user)
                $msg = "Please fill out your Username.";
            else if(!$pass)
                $msg = "Please fill out your Password.";
            else if(!$email)
                $msg = "Please fill out your E-Mail Address.";
            else
            {
                $check = mysql_query("SELECT login FROM accounts WHERE login=\"".$user."\" LIMIT 1", $con);
                if(mysql_numrows($check) > 0)
                    $msg = "This account already exists.";
                else
                {
                    $query = "INSERT INTO accounts (login, password, email, flags) VALUES ('" . mysql_real_escape_string($user) . "', '" . mysql_real_escape_string($pass) . "', '" . mysql_real_escape_string($email) . "', '" . mysql_real_escape_string($pack) . "');";
    
                    if(!mysql_query($query, $con))
                        $msg = "Creation of ".$user." has failed.";
                    else
                        $msg = "Account ".$user." has been created.";
                }
            }
            @mysql_close($con);
        }
    }
    ?>
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <title>Account Creation</title>
    
    <style type="text/css">
    /*----------Text Styles----------*/
    .ws6 {font-size: 8px;}
    .ws7 {font-size: 9.3px;}
    .ws8 {font-size: 11px;}
    .ws9 {font-size: 12px;}
    .ws10 {font-size: 13px;}
    .ws11 {font-size: 15px;}
    .ws12 {font-size: 16px;}
    Anything I'm doing wrong? :/ Would really appreaciate some help here!
    tell me if I'm doing something else rong aswell.

    (You can check for yourself at cachewow.servegame.org
    urs,
    Antonp93 - pew.

    hmm not sure there could be a problem with your config which results in error in $check..

    however try changing it to
    if(mysql_numrows($check) > 0)

    to

    if ( mysql_num_rows( $check ) )

  3. #3
    antonp93's Avatar Member
    Reputation
    3
    Join Date
    Apr 2007
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didn't work.
    Here's the error text from regpage:
    "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AC Web Ultimate Repack\Server\htdocs\register\index.php on line 25"

    You have the code above.

Similar Threads

  1. Keep getting this error when opening necro bot
    By skyline72 in forum Pokemon GO Hacks|Cheats
    Replies: 6
    Last Post: 08-13-2016, 10:57 AM
  2. Replies: 1
    Last Post: 08-07-2016, 03:29 PM
  3. (HELP) kepp getting this error...
    By gangstajosh55 in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 04-10-2008, 09:33 PM
  4. I Get This Error When I Run Execute Batch File On Navicat
    By BillyBob31 in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-01-2008, 07:28 AM
  5. [Question] Keep getting an Error
    By link244 in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 02-27-2008, 09:17 AM
All times are GMT -5. The time now is 01:18 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search