anders thoresson wrote:
Hi,
I've the query "SELECT albums.name, albums.albumid, accessrights.albumid, accessrights.userid FROM albums, accessrights WHERE accessrights.userid = '$id' AND albums.albumid = accessrights.albumid".
It works allright. Using the result in a html <SELECT>-tag this way works:
while($row = mysql_fetch_array($result)) { echo("<OPTION VALUE=\"$row[1]\"> $row[0]"); }
But if I tries the following line, the script fails:
echo("<OPTION VALUE=\"$row['albums.albumid']\"> $row['albums.name']");
with the notice: Undefined index: 'albums.albumid' in <b>c:\web\thoresson.net\include\user_functions.php</b> on line <b>24</b>
I've been trying to learn PHP for three months now, but tonight was the first time I sat down with my project for two week, so I'm sorry if I'm bothering you with something obvious that I've just forgotten. :)
But I need to know: What am I doing wrong?
Best regards.
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php