Well, I have a problem with my code. I have 2 forms in which one is logged in and the other is a register. I am using a one page template, and I am having problems. When I do the register everything is ok without problems, the problem is when I log in. I am using 3 files for each thing, one that has the html which is where the code of both forms is, I have 1 to connect to BD which is what I am using for the 2 also, and I have another one to connect to table and ask for the data I need, each having his own. I at the beginning of each form in the html I am requesting the information of the due file being the login loginpro.php as you can see in the code below.
<script language="javascript">
function submitform()
{
document.forms["as"].submit();
}
</script>
<form name="as" method="POST" action="loginpro.php">
Username: <input type="text" name="username" /><br /><br />
Password: <input type="password" name="password" /><br /><br />
<input style="font-size: 17px" type=button onClick="submitform()" value="Submit"/>
</form>
My problem is that when I try to login I do not try to use loginpro.php but rather regpro.php which is the file I use for the register as well as the code below.
<script language="javascript">
function submitform()
{
document.forms["register"].submit();
}
</script>
<center>
<form name="register" method="POST" action="regpro.php">
Username: <input type="text" name="username" /><br /><br />
Email: <input type="text" name="Email" /><br /><br />
First Name: <input type="text" name="fname" /><br /><br />
Last Name: <input type="text" name="lname" /><br /><br />
Password: <input type="password" name="password" /><br /><br />
<input style="font-size: 11px" type=button onClick="submitform()" value="Submit"/>
</form>
If you can help me, I get very agitated because I need this ready with some urgency.