Question
| From: | Tom Luigjes | Date: | Fri, 11 Mar 2005 08:37:32 +0000 |
| Subject: | Question | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-27655@lists.php.net to get a copy of this message | ||
Dear sir ...,
I've got a question regarding a hard to understand piece of code...
I could really use some help on it, since i can't find anything or anyone
that has experienced the same problem.
Okay let's start:
I've got the following database:
The table is called config
and the structure is like this:
id | title | content
I want to insert values in it, which looks a bit like this:
id | title | content
---------------------------
1 | username | t0k
2 | password | mypassword
Now i wish to use this for an admin login function
I'm selecting the database like this:
$result = mysql_query("SELECT * FROM config");
$myrow = mysql_fetch_object($result);
Then i need to give the following strings a value from the table:
$_username = ...
$_password = ...
I tried doing it like this:
$_username = $myrow["username"];
$_password = $myrow["password"];
But hey! That doesn't work...
I could really use some help on this, because i can't solve it on my own,
and i've already posted this question in forums etc. but no-one i talk to
seems to know how to solve this...
Please help me out!
Thanks in advance,
Tom Luigjes