Jump to content

[SOLVED] marking set?


Crew-Portal

Recommended Posts

I am redesigning my site and I want to make it more efficent as in using less pages! I had it before going for login there were 2 pages login and logingo. login contained forms and logingo had the SQL connections. But how do I make it so that the SQL does not activate until the button "Login" is pressed. may seem kinda stupid but I want it so that the logins are on one page! I know it is a isset thing but how do I use it?

Link to comment
https://forums.phpfreaks.com/topic/63725-solved-marking-set/
Share on other sites

Try something like this -

<?php if (isset($_POST['login'])) { //if login pressed
do LoginStuff_Here;
} else { //else show form
?>
<form action=# method=post>
User: <input type=text name=lname><br>
Password: <input type=password name=pass><br>
<input type=submit name=login value=Login!>
<?php } ?>

 

Hope this helps,

Steve

Link to comment
https://forums.phpfreaks.com/topic/63725-solved-marking-set/#findComment-317544
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.