Corey Maddox Posted December 5, 2007 Share Posted December 5, 2007 Okay pretty much it runs off a data saved text file. This is the script: $cfgLogin[1] = 'corey.maddox'; $cfgPassword[1] = 'japanese'; $cfgUserLevel[1] = '0'; $cfgUserID[1] = '0'; I have made a register script that saves Username, Pass, Level and Id to a mysql database I am trying to get the user, pass, level and id to display INTO this witha row fetch like this: <? $host = "localhost"; $user = "username"; $pass = "pass"; $dbname = "test"; $connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>"); mysql_select_db($dbname); $sql = 'SELECT * FROM `data` LIMIT 0, 30 '; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)) { echo "$cfgLogin[",$row['id'],"] = '",$row['name'],"';","<br>" $cfgLogin[",$row['id'],"] = '",$row['pass'],"';","<br>" $cfgLogin[",$row['id'],"] = '",$row['level'],"';","<br>" $cfgLogin[",$row['id'],"] = '",$row['id']; } ?> but it will not display right. I would love any help you can give me -Corey Maddox Link to comment https://forums.phpfreaks.com/topic/80370-solved-need-help-with-a-home-made-login-script/ Share on other sites More sharing options...
teng84 Posted December 5, 2007 Share Posted December 5, 2007 http://www.w3schools.com/php/php_mysql_select.asp read.. i guess you have to understand first the flow before anything else thanks .. Link to comment https://forums.phpfreaks.com/topic/80370-solved-need-help-with-a-home-made-login-script/#findComment-407378 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.