I am having a major issue passing session variables via link from a list of options. Having searched through numerous posts I havent seen anything that is of help. So here is a sample of the code.
enter code heresession_start();
enter code hereforeach($clients as $client){
enter code here$_SESSION['name']=$client ->user_name;
enter code here$_SESSION['title']=$client ->user_title;
enter code here$_SESSION['client_id']=$client ->user_id;
enter code here$_SESSION['info']=$client ->user_info;
enter code here$_SESSION['type']=$client ->user_type;
enter code here$_SESSION['project_ref']=$client ->user_project_ref;
enter code here$_SESSION['client_project']=$client ->user_project;
enter code here$client_id=$_SESSION['client_id'];
}
Then in the list we have
enter code here
in the 'client' page we have
enter code heresession_start();
enter code hereif(isset($_SESSION['name'])) {
enter code here$_SESSION['client_id'];
enter code here$_SESSION['name'] ;
enter code here$_SESSION['title'];
enter code here$_SESSION['info'];
enter code here$_SESSION['type'];
enter code here$_SESSION['project'];//echo $project;
enter code here$_SESSION['ref']; }
enter code here<?php $clients=$wpdb->get_results($wpdb->prepare( " SELECT * FROM vo_wp_clients where user_id= '$client_id'"));
The page opens but the result is incorrect. If I echo the session variables it shows the settings for the wrong entry. I'm sure I am missing something straightforward but any help would be very helpful