newbie-ghozt Posted April 8, 2009 Share Posted April 8, 2009 i need help, making a website login with PHP. Ok, and i need to know how to host a server with apache to test it. I know nothing about php. Any help appreciated. Website is here http://ghoztnetwork.x10hosting.com/index.html (not finished yet, havent even made the main page ) Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/ Share on other sites More sharing options...
Maq Posted April 8, 2009 Share Posted April 8, 2009 Install WAMP (windows) or LAMP (linux), Google it, you will find the install. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804099 Share on other sites More sharing options...
bobk Posted April 8, 2009 Share Posted April 8, 2009 simple one. <?php $username = "admin"; $password = "pass"; if ($_POST['txtusername'] != $username || $_POST['txtpassword'] != $password) { ?> <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table border="1" cellspacing="0" cellpadding="0" align="center"> <tr><td><label for="txtusername">Username:</label><br /> <input type="text" title="Enter your Username" name="txtusername" value="admin" /></td></tr> <tr><td><label for="txtpassword">Password:</label><br /> <input type="password" title="Enter your password" name="txtpassword" /></td></tr> <tr><td align="center"><input type="submit" name="Submit" value="Login" /></td></tr> </table> </form> <?php } else { ?> <?php header( 'Location: http://www.website addy.com' ) ; ?> <?php } ?> bascailly. if user & admin = correct go to < header. > good for a single admin login page Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804108 Share on other sites More sharing options...
newbie-ghozt Posted April 8, 2009 Author Share Posted April 8, 2009 I meant a Member login area. So the members can access certain pages and also each member has a profile page. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804114 Share on other sites More sharing options...
Maq Posted April 8, 2009 Share Posted April 8, 2009 I meant a Member login area. So the members can access certain pages and also each member has a profile page. What have you done so far? P.S. - Your link gives me an "Address Not Found" error. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804125 Share on other sites More sharing options...
newbie-ghozt Posted April 8, 2009 Author Share Posted April 8, 2009 What have you done so far? P.S. - Your link gives me an "Address Not Found" error. nothing, just messed around by following a tutorial, failed miserably. address not found ??? i get it fine. Idk, anyone else get address not found ? Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804179 Share on other sites More sharing options...
revraz Posted April 8, 2009 Share Posted April 8, 2009 http://www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html If you don't find a good tutorial, look for another. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804180 Share on other sites More sharing options...
Maq Posted April 8, 2009 Share Posted April 8, 2009 address not found ??? i get it fine. Idk, anyone else get address not found ? Never mind, it works now. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804182 Share on other sites More sharing options...
newbie-ghozt Posted April 8, 2009 Author Share Posted April 8, 2009 Ok, if some one could walk me through making it please do. It would really be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804281 Share on other sites More sharing options...
trq Posted April 8, 2009 Share Posted April 8, 2009 Ok, if some one could walk me through making it please do. It would really be appreciated. There are literally thousands of these tutorials on the net, were not here to write more of them. If you have problems with code, post it, otherwise I suggest googling a tutorial. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804285 Share on other sites More sharing options...
Yesideez Posted April 8, 2009 Share Posted April 8, 2009 I started learning here from these guys: http://www.w3schools.com/ Look down the left menu until you see "Learn PHP" - I've not linked directly to that page so you can see what else they have on there. Very informative with easy step-by-step guides. Quote Link to comment https://forums.phpfreaks.com/topic/153086-making-a-login-with-php-for-a-website-help/#findComment-804286 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.