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 Quote Link to comment 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 .. Quote Link to comment 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.