Jump to content

updating array problem


Lassie

Recommended Posts

I am trying to update an array which holds a list of property ids as a browse list.The list is then viewed.

I pass the required property_id as a Get and attempt to add to a session array.

I get an undefined variable error.

Can anyone help please.

session_start();
  

  @ $property_id = $_GET['property_id'];
  	echo $property_id;
  
  
  		if($property_id)
  {
    //new item selected
    	if(!isset($_SESSION['browse']))
    {
      	$_SESSION['browse'] = array();
      
    }
    
    $_SESSION['browse']='$product_id';
}
if($_SESSION['browse']&&array_count_values($_SESSION['browse']))

    display_browse($_SESSION['browse']);
  else
  {
    echo '<p>There are no properties in your browse list</p>';
    echo '<hr />';
  }

Link to comment
https://forums.phpfreaks.com/topic/58399-updating-array-problem/
Share on other sites

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.