Field 'name' doesn't have a default value

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Alright,

I have a problem, every time i regsiter, it comes up with Field 'name' doesn't have a default value but then it registers their account?

I'd just like to get rid of this error, because it could make users not go online thinking their is a problem with the registration. I know it isn't a part of the CMS as i have changed it.

The wwwroot i am using is from @Wouto's Babbo CMS release.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Go to design view of your users table and allow null for "name"

OR

Go to your register page and add a field where they input their name, check to make sure its valid, then put it in the NAME column
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
If it is register, wouldn't it be in the users database?

@BIOS - the full error is that, Field 'name' doesnt have a default value
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
@JayCustom

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>
 

Users who are viewing this thread

Top