[Help] Default Value - Name

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Error: field 'name' doesn't have a default value

I've found it in RANKS database, but i dont know what to set it to, can you guys help me please?

Register Code:
Code:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName} - Register</title>
        <link rel="shortcut icon" href="{url}/favicon.ico?<?php echo time() ?>" type="image/x-icon"/>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/embedregistration.css" type="text/css">
       
       
        <style type="text/css">
            input[type="submit"], input[type="button"] {
                background: url('{url}/app/tpl/skins/Habbo/images/reg.png?1') top;
                font: bold 11px verdana;
                line-height: 24px;
                color: white;
                height: 25px;
                width: 139px;
                border: 0;
            }
            input[type="submit"]:hover, input[type="button"]:hover {
                background-position: bottom;
                cursor: pointer;
            }
        </style>
       
        <!--[if IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
        <![endif]-->
        <!--[if lt IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
        <![endif]-->
        <!--[if lt IE 7]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
            <script type="text/javascript">
                try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
            </script>
            <style type="text/css">
                body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
            </style>
        <![endif]-->
    </head>
   
    <body>
        <div id="overlay"></div>
<div id="container" class="phase-0" style="margin-top: 10px;">
    <p class="phishing-warning">If it says the following: <b>Field 'name' doesn't have a default value</b>don't worry, you just need to login once your registered.</p>       
        <div id="container" class="phase-0" style="margin-top: 10px;">
            <div class="register-container clearfix">
                <div class="register-header">Register at {hotelName}</div>
                <div id="register-content">
                    <div id="subheader">Fill in the form below to register your account.</div>
                    <div class="register-container-bottom-end register-content clearfix">
                        <div id="auth-providers" class="auth-providers">
                            <ul>
                                <li class="facebook"><a href="http://facebook.com/OfficialBabbo" class="provider"></a></li>
                                <li class="twitter"><a href="#" class="provider"></a></li>
                            </ul>
                        </div>
                        <div id="register-page" style="clear: left" class="phase-0 clearfix">
                            <div class="phase-0">
                                <form method="post" id="phase-0-form">
                                    <div id="error-messages-container"><?php if(isset($template->form->error)) { echo '<div class="error-messages-holder"><ul><li><p class="error-message">'.$template->form->error.'</p></li></ul></div>'; } ?></div>
                                    <div id="name-field-container">
                                        <div class="field field-habbo-name">
                                            <label for="habbo-name"><b>Username</b></label>
                                             
                                            <input type="text" id="habbo-name" size="35" value="<?php echo $template->form->reg_username; ?>" name="reg_username" class="text-field" maxlength="32">
                                            <div style="float:left"><p class="help">Choose an appropriate username</div>
                                        </div>
                                    </div>
                                    <div class="field field-password">
                                        <label for="password"><b>Password</b></label>
                                        <input type="password" id="password" size="35" name="reg_password" value="" class="password-field" maxlength="32">
                                        <div style="float:left"><p class="help">Choose a password</div>
                                    </div>
                                    <div class="field field-password2">
                                        <label for="password2"><b>Confirm Password</b></label>
                                        <input type="password" id="password2" size="35" name="reg_rep_password" value="" class="password-field" maxlength="32">
                                        <div style="float:left"><p class="help">Verify your password</div>
                                    </div>
                                    <div class="field field-email">
                                        <label for="email"><b>Email Address</b></label>
                                        <input type="text" id="email" size="35" name="reg_email" value="<?php echo $template->form->reg_email; ?>" class="text-field" maxlength="48">
                                        <div style="float:left"><p class="help">Enter an email address</div>
                                    </div>
                                    <div class="field field-referrer">
                                        <label for="referrer"><b>Referrer</b></label>
                                        <input type="text" id="referrer" size="35" name="reg_referrer" value="<?php echo $_GET['ref']; ?>" class="text-field" maxlength="25">
                                        <div style="float:left"><p class="help">Username of the person who invited you</div>
                                    </div>
                                   
                                    <input type="submit" value="Create Account" name="register">
                                    <a href="{url}/index" style="float:right;margin-right:12px;">Cancel</a>
                                   
                                   
                                   
           

                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="register-container-bottom"></div>
                <!--[if lt IE 7]>
                    <script type="text/javascript">
                        Pngfix.doPngImageFix();
                    </script>
                <![endif]-->
            </div>
        </div>
        <script type="text/javascript">
            HabboView.run();
        </script>
   
    </body>
</html>
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
In the ranks database design, the field 'name' has been set to allow null, and still continues.
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
The error when registering is:

field 'name' doesnt have a default value

There is no field in the users database but in which is in the ranks database, it is set to allow null but in which still gives me an error.
 

Evilsmoothie

Mad kung-fu artist
Feb 11, 2013
446
57
The error when registering is:

field 'name' doesnt have a default value

There is no field in the users database but in which is in the ranks database, it is set to allow null but in which still gives me an error.
Then the error is not related to your ranks table. Could you drop your users table structure and let us/me/whoever have a look at it?
Edit: Or turn of Mysql strict mode and see if that solves it. Simply run this query: SET @@global.sql_mode= '';
 

Users who are viewing this thread

Top