jackr1909 Posted April 8, 2011 Share Posted April 8, 2011 Hi, I have a members page and i want it to post the members id from an php array file that i created, like for this website. Thanks is advance Link to comment https://forums.phpfreaks.com/topic/233053-show-login-name-from-array/ Share on other sites More sharing options...
jackr1909 Posted April 8, 2011 Author Share Posted April 8, 2011 a table like this: <?php $usr_username = $_POST['username']; $usr_password = $_POST['password']; $usr_name = $_POST['name']; $users = array(); $passwords = array(); $users[0] = 'user1'; $passwords[0] = 'pass1'; $users[1] = 'user1'; $passwords[1] = 'pass1'; for($i=0;$i<count($users);$i++){ if($users[$i] == $usr_username && $passwords[$i] == $usr_password){ header( 'Location: http://www.theblogspace.net/login/loginrefferingtoken.html' ) ; } else { header( 'Location: http://www.theblogspace.net/login/loginfail.php' ) ; } } ?> I want to show that on a members page corresponding to their login. Link to comment https://forums.phpfreaks.com/topic/233053-show-login-name-from-array/#findComment-1198599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.