Jump to content

[SOLVED] Cannot use a scalar value as an array


cypr

Recommended Posts

<?php session_start();

 

include ("../../../../db.php");

 

$val = $_POST['value'];

 

//$x = explode(":-:",$val);

 

 

 

$user = mysql_query("SELECT * FROM user WHERE ID = ".$val." ");

 

while($row = mysql_fetch_array($user))

 

{

 

$_SESSION['users']['user2']['user_name'] = $row['User_Name'];

 

$_SESSION['users']['user2']['ID'] = $row['ID'];

 

}

 

$user = mysql_query("SELECT * FROM user WHERE User_Name = '".$_SESSION['MM_Username832']."'");

 

while($row = mysql_fetch_array($user))

 

{

 

$_SESSION['users']['you']['user_name'] = $row['User_Name'];

 

$_SESSION['users']['you']['ID'] = $row['ID'];

 

}

 

echo $val."-".$_SESSION['users']['user2']['user_name']."-".$_SESSION['users']['you']['user_name'];

 

?>

and here are the errors:

Warning: Cannot use a scalar value as an array in /opt/lampp/htdocs/sites/cardmarkit/pages/unique_tracker/trading2_files/sessions/sports.php on line 9

 

Warning: Cannot use a scalar value as an array in /opt/lampp/htdocs/sites/cardmarkit/pages/unique_tracker/trading2_files/sessions/sports.php on line 10

 

Warning: Cannot use a scalar value as an array in /opt/lampp/htdocs/sites/cardmarkit/pages/unique_tracker/trading2_files/sessions/sports.php on line 15

 

Warning: Cannot use a scalar value as an array in /opt/lampp/htdocs/sites/cardmarkit/pages/unique_tracker/trading2_files/sessions/sports.php on line 16

this works perfectly in windows......

 

Archived

This topic is now archived and is closed to further replies.

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