![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
tommybfisher
-
Posts
26 -
Joined
-
Last visited
Never
Posts posted by tommybfisher
-
-
Hi,
I'm Tommy and I have my own fruit and vegetable home delivery business. My current website was coded by someone else so I'm now teaching myself php as I want to completely redesign the site.
I look forward to any advice members may be able to share with me along the way.
Why am I being returned to index.php?
in PHP Coding Help
Posted
Hi,
I have a dynamic php page - index.php. In one section (called nav.php) is the user login input boxes (username and password). If the user navigates to the registration section, nav.php remains (including the login form) and the registration form is displayed in the main area.
I currently do not have the registration form linked with the MySql database yet as I am just testing. However, when the submit button is pressed on the registration form, it always returns the user to index.php. I have tried different settings in the form action page, even setting it to a new page entirely (I simply want it to send the form back to the same page).
Does anyone know why it is always sending me back to index.php? Is it because when the registration form is viewed by the user, there are two forms on display (login in the nav.php section and registration in regform.php)?
Any advice would be appreciated.
Thanks,
Tommy
My code is below.
The first snippet is the code for index.php:
Here is the code for nav.php:
And this is the code for the registration form: