Hi People, I need some help regarding login form.I have a login form from which i want users to select where they want to login like if from one login form they can choose if they want to login as subscriber or as a writer. Thanks
Hey, I mentioned everything in the last post i'll give u the code now : <form method="post" action="1stfile.php"> <input type="hidden" name="action" value="user_login"> <table border="0" width="200" cellspacing="0" cellpadding="4" class="common_table"> <tr><td align="center" colspan="2" class="common_table_top_cell">Log In</td></tr> <tr> <td align="left" class="cell_embosed2">Username </td> <td align="left" class="cell_embosed2"><INPUT class="field10" maxLength="15" size="15" name="username" value=""></td> </tr> <tr> <td align="left" class="cell_embosed2">Password </td> <td align="left" class="cell_embosed2"><INPUT class="field10" type="password" maxLength="15" size="15" name="password" value=""></td> </tr> <tr> <td align="left" nowrap class="cell_embosed2">Remember me </td> <td align="left" class="cell_embosed2"><input type="checkbox" value="1" name="remember_me"></td></tr> <tr><td align="center" colSpan="2" class="cell_embosed2"><input type="submit" value="Submit" name="B1" class="button10"></td></tr> </table> </form> Code (markup): <form method="post" action="2ndfile.php"> <input type="hidden" name="action" value="user_login"> <table border="0" width="200" cellspacing="0" cellpadding="4" class="common_table"> <tr><td align="center" colspan="2" class="common_table_top_cell">Log In</td></tr> <tr> <td align="left" class="cell_embosed2">Username </td> <td align="left" class="cell_embosed2"><INPUT class="field10" maxLength="15" size="15" name="username" value=""></td> </tr> <tr> <td align="left" class="cell_embosed2">Password </td> <td align="left" class="cell_embosed2"><INPUT class="field10" type="password" maxLength="15" size="15" name="password" value=""></td> </tr> <tr> <td align="left" nowrap class="cell_embosed2">Remember me </td> <td align="left" class="cell_embosed2"><input type="checkbox" value="1" name="remember_me"></td></tr> <tr><td align="center" colSpan="2" class="cell_embosed2"><input type="submit" value="Submit" name="B1" class="button10"></td></tr> </table> </form> Code (markup): These are the codes of two login form now i want like I have one login form and people can choose from a dropdown menu or checkbox that if they want to login as subscriber or writer.
the easiest way is to use radio buttons, below is an example code for you to add in ur form; <input type="radio" name="loginas" value="subscriber">Subscriber <input type="radio" name="loginas" value="writer">Writer Code (markup):