On Fri, 2011-05-20 at 19:46 +0430, Negin Nickparsa wrote: > the thing that is important to me is setting session > because i want the tables of the one that clicked be showed on patient.php > how can i change my wrong code? You have to realise that PHP code runs on the server, all before it sends the output to your browser. A basic example works like this: 1. You request a page in your browser by typing in the URL 2. The server receives this request 3. The server then does whatever processing is in the script (assuming you requested a .php file) and it is the script which is responsible for your HTML output 4. The web server sends this output back to your browser If you need things to be run on the server as a result of you doing something in your browser, then you need to either trigger some sort of page refresh or new page request, or use Javascript to make a series of AJAX requests. PHP code isn't run in your browser, and it knows nothing about what you do in it. For that, you need a client-side language such as Javascript. -- Thanks, Ash http://www.ashleysheridan.co.uk