Assign One Time Username in PHPMYSQL
<p>i am working on a <code>login</code> <code>Script</code>. I have a registration and its login, what i need to give a single access/login, i have my fields in <code>database</code> table name is <code>qz_userauth</code> as <code>ID</code> <code>fname</code> <code>lname</code> <code>email</code> <code>username</code> <code>password</code>. Restrict <code>login</code> after one attempt. Possible ?</p>

<p>Here is <code>login Form</code></p>

<pre><code>&lt;form action="functions.php" method="post" id="login"&gt;
                &lt;fieldset&gt;
                    &lt;legend&gt;Login &lt;/legend&gt;
                    &lt;ul&gt;
                        &lt;li&gt;
                            &lt;label for="username"&gt;&lt;span class="required"&gt;Username&lt;/span&gt;&lt;/label&gt;
                            &lt;input id="username" name="username" class="text required" type="text" /&gt;
                            &lt;label for="username" class="error"&gt;This field cannot be empty&lt;/label&gt;
                        &lt;/li&gt;

                        &lt;li&gt;
                        &lt;label for="password"&gt;&lt;span class="required"&gt;Password&lt;/span&gt;&lt;/label&gt;
                        &lt;input name="password" type="password" class="text required" id="password" maxlength="20" /&gt;
                    &lt;/li&gt;
                    &lt;?php if($_SESSION['LCNT']&gt;=4){  ?&gt;
                    &lt;li&gt;
                        &lt;p id="p-captcha"&gt;
                            &lt;div id="captchaImg"&gt;&lt;img id="captcha" src="captcha/securimage_show.php" alt="CAPTCHA Image" /&gt;&lt;/div&gt;
                            &lt;div id="captchaInput"&gt;&lt;input type="text" name="captcha_code" size="16" maxlength="6" value="Enter Captcha" /&gt;&lt;/div&gt;
                            &lt;div id="captchaRefresh"&gt;&lt;a href="#" onclick="document.getElementById('captcha').src = 'captcha/securimage_show.php?' + Math.random(); return false"&gt;&lt;img src="captcha/images/refresh.gif" /&gt;&lt;/a&gt;&lt;/div&gt;
                        &lt;/p&gt;
                    &lt;/li&gt;
                    &lt;?php } ?&gt;
                    &lt;li&gt;
                        &lt;label class="centered info"&gt;&lt;a id="forgotpassword" href="fpass.php"&gt;Forgot Your password...&lt;/a&gt;&lt;/label&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/fieldset&gt;
            &lt;input type="hidden" name="action" value="login" /&gt;
            &lt;fieldset class="submit"&gt;
                &lt;input type="submit" class="sbutton" value="Login" /&gt; &amp;nbsp; &lt;input type="button" class="sbutton" value="Register"  onclick="window.location='register.php'" /&gt;
            &lt;/fieldset&gt;


        &lt;/form&gt;
</code></pre>
