Jump to content

[SOLVED] Login Script - Need Help Please... - pt.2


Corey Maddox

Recommended Posts

Okay I have a login script and it writes 4 things into a mySQL database

 

Username - name

Password - pass

Level - level

ID - id

 

mainly I have this script that calls for the lines and displays them how they need to be.

 

<?

$host = "sql06.freemysql.net";

$user = "coreyma";

$pass = "japanese";

$dbname = "csmusers";

 

$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 "$";

echo "cfgLogin[",$row['id'],"]&nbsp=&nbsp'",$row['name'],"';<br>";

echo "$";

echo "cfgPassword[",$row['id'],"]&nbsp=&nbsp'",$row['pass'],"';<br>";

echo "$";

echo "cfgUserLevel[",$row['id'],"]&nbsp=&nbsp'",$row['level'],"';<br>";

echo "$";

echo "cfgUserID[",$row['id'],"]&nbsp=&nbsp'",$row['id'],"';<br><br>";

}

 

?>

 

 

This the rows and style needs to be actually inserted into the php file, not echoed and displayed...

I dunno how to do that, any help would be great.

Link to comment
Share on other sites

No... right now the text is being echoed as

 

$cfgLogin[1] = 'test';

$cfgPassword[1] = 'test';

$cfgUserLevel[1] = '';

$cfgUserID[1] = '1';

 

But it is echoing as displayed text... I need it to somehow just be on the page and not echoed... liek part of the actual script...

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.