ID:               29217
 User updated by:  all4blitz at fftemple dot it
 Reported By:      all4blitz at fftemple dot it
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows 2000 Professional
 PHP Version:      4.3.7
 New Comment:

the first part of the code is like this sorry:
$db=mysql_connect($host,$user,$pass);
mysql_select_db("sets", $db);
$query = "SELECT * FROM config LIMIT 0,1";
$settings = mysql_query($query, $db); 
while ($sr = mysql_fetch_array($settings)){
if($sr["default"]=="Y"){


Previous Comments:
------------------------------------------------------------------------

[2004-07-16 21:08:54] all4blitz at fftemple dot it

the first part of the code is like this sorry:
$db=mysql_connect($host,$user,$pass);
mysql_select_db("sets", $db);
$query = "SELECT * FROM config LIMIT 0,1";
$settings = mysql_query($query, $db); 
while ($sr = mysql_fetch_array($settings)){
if($sr["default"]=="Y"){

------------------------------------------------------------------------

[2004-07-16 21:05:16] all4blitz at fftemple dot it

Description:
------------
After any mysql query, php returns this string:
"Notice: Undefined index: user in d:\etc..."
"user" is the name of the mysql called field.
But the page still works perfectly.

Reproduce code:
---------------
$db=mysql_connect($host,$user,$pass);
mysql_select_db("sets", $db);
$query = "SELECT * FROM config LIMIT 0,1";
$result = mysql_query($query, $db); 
while ($sr = mysql_fetch_array($settings)){
if($row["default"]=="Y"){
$url_noslash=$row["url_noslash"];
$siteurl=$row["url"];
$librerie_att=$row["librerie"];
$admin_user=$row["user"];
$admin_password=$row["password"];
$session_file=$row["sessionfile"];
$counter_hp=$row["contatore_hp"];
$counter_op=$row["contatore_op"];
$predlang=$row["lingua"];
$defaultpage=$row["homepage"];
$predskin=$row["skin"];
}

Expected result:
----------------
variable "$admin_user" equal to mysql field "user" to use in the
background

Actual result:
--------------
Notice: Undefined index: user in d:\etc... on line 11


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29217&edit=1

Reply via email to