Register Error

Nebula

Member
Mar 4, 2013
162
1
Alright so, I've looked through the entirety of the coding for this cms and I cant seem to be able to find where the error is coming from.


Im using wabbocms & whenever I register, it says "DUPLICATE ENTRY FOR KEY "PRIMARY"


register.php

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">       
 
    <?php
 
        $Site_title = "Register";
 
        $Page_id = "10";
 
        $Sub_name = "Register Now!";
 
        require('Extra/Head.php');
 
    ?>
 
 
 
            <br clear="all"/>
 
            <div class="content container">
 
                <div class="content_padding small">
 
                    <form method="post">
 
                    <?php
 
                        if(isset($template->form->error))
 
                        {
 
                    ?>
 
                        <div class="content_full" id="content_error">
 
                            <div class="content_box full">
 
                                <div class="content_padding smaller">
 
                                    <span class="content_title error"><?php echo $template->form->error; ?></span>
 
                                </div>
 
                            </div>
 
                        </div>
 
                    <?php
 
                        }
 
                    ?>
 
                    <div class="content_half">
 
                        <div class="content_box half">
 
                            <div class="content_padding smaller">
 
                                <div class="content_title green">Account Details</div>
 
                                <div class="content_padding">
 
                                    <div class="input_div">
 
                                        <label id="username_availability_result">Username</label><br>
 
                                        <input class="input_form r_user" type="text" id="rUsername" name="rUsername"/>
 
                                        <input type="button" class="button grey check" id="check_username_availability" value="Check">
 
                                    </div>
 
                                    <div class="input_div">
 
                                        <label>Email</label><br>
 
                                        <input class="input_form" type="text" name="rEmail"/>
 
                                    </div>
 
                                    <div class="input_div">
 
                                        <label>Password</label><br>
 
                                        <input class="input_form" type="password" name="rPassword"/>
 
                                    </div>
 
                                    <div class="input_div">
 
                                        <label>Confirm Password</label><br>
 
                                        <input class="input_form" type="password" name="rPassword2"/>
 
                                    </div>
 
                                  </div>
 
                            </div>
 
                        </div>
 
                    </div>
 
                    <div class="content_half right">
 
                        <div class="content_box half">
 
                            <div class="content_padding smaller">
 
                                <div class="content_title red">Choose your look</div>
 
                                <div class="content_padding">
 
                                    <div class="input_div preview">
 
                                        <div class="account_div register">
 
                                            <div class="selected_avatar">
 
                                                <img class="selected_avatar_display" src="/avatar.php?look=hr-165-39.hd-209-10.ch-255-70.lg-285-64.sh-906-62.ea-1404-64.wa-2012&direction=4&head_direction=4&size=l">
 
                                            </div>
 
                                            <div class="register_avatar_container">
 
                                                <div class="register_avatar_boxes male">
 
                                                    <?php
 
                                                        $Male_Query = mysql_query("SELECT look FROM cms_figures WHERE gender = 'Male' LIMIT 5");
 
                                                        while ($Male_Avatars = mysql_fetch_assoc($Male_Query))
 
                                                        {
 
                                                    ?>
 
                                                        <div class="register_avatar">
 
                                                            <div style="width:100%;height:100%;background:url(/avatar.php?look=<?php echo $Male_Avatars['look']; ?>&direction=4&head_direction=4&size=s);" onclick="previewAvatar(this.id);" onchange="previewAvatar(this.id);" id="<?php echo $Male_Avatars['look']; ?>"></div>
 
                                                        </div>   
 
                                                    <?php                                               
 
                                                        }
 
                                                    ?>
 
                                                </div>
 
                                                <div class="registe_avatar_boxes female">
 
                                                    <?php
 
                                                        $Female_Query = mysql_query("SELECT look FROM cms_figures WHERE gender = 'Female' LIMIT 5");
 
                                                        while ($Female_Avatars = mysql_fetch_assoc($Female_Query))
 
                                                        {
 
                                                    ?>
 
                                                        <div class="register_avatar">
 
                                                            <div style="width:100%;height:100%;background:url(/avatar.php?look=<?php echo $Female_Avatars['look']; ?>&direction=4&head_direction=4&size=s);" onclick="previewAvatar(this.id);" onchange="previewAvatar(this.id);" id="<?php echo $Female_Avatars['look']; ?>"></div>
 
                                                        </div>   
 
                                                    <?php                                               
 
                                                        }
 
                                                    ?>
 
                                                </div>
 
                                            </div><br clear="all"/>
 
                                        </div>
 
                                        <input type="hidden" name="rAvatar" id="rAvatar" value="hr-165-39.hd-209-10.ch-255-70.lg-285-64.sh-906-62.ea-1404-64.wa-2012">
 
                                    </div>
 
                                    <div class="input_div">
 
                                        <div id="show_question"><label class="register float_left">Security Question:</label></div>
 
                                        <input type="text" name="rSecurity" class="input_form" onkeyup="show_button(this.value);" value="">
 
                                    </div>
 
                                    <div id="hide_register">
 
                                        <div class="button no_click black login">Answer the security question</div>
 
                                    </div>
 
                                  </div>
 
                            </div>
 
                        </div>
 
                    </div><br clear="all"/>
 
                    </form>
 
                </div>
 
            </div>
 
            <br clear="all"/>
 
            <?php
 
                require('Extra/Footer.php');
 
            ?>
 
        </center>
 
    </body>
 
</html>
 

St4nley

Member
Apr 13, 2013
469
76
its your database not cms related just delete an entry in primary in register table if there is one? or users sorry havent been on a database in a while
 

Nebula

Member
Mar 4, 2013
162
1
oh yea, thats the problem I totally forgot, so basically < when you register it will save your info into the db but will show the error even though there is no duplicate entry, then when you go to the index it lets you log in
 

Users who are viewing this thread

Top