Jump to content
Weiss

Little advice about login page

Recommended Posts

Hi. I wanna create a signup/login thingy. You can see it at sweiss.co.il/sfn/    . So i have the index.html with 2 forms 1 for login and 1 for signup, each has his own action going to login.php and signup.php , but i want them both leading to something like main.php only problem i dont know how to figure if the user clicked on the submit of the new user or the sumbit of the login as existent user (which obviously make main.php behave differently). Whats the best way to make it happen? Thanx very much in advance

Share this post


Link to post
Share on other sites

If both have a different submit button, simply do an if question: 

if (isset($_POST["login"])) {

Do this
}

 

if (isset($_POST["register"])) {

Do this
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...