Using a session is a bad approach in this situation. You probably just want to pass the user id to the removal confirmation page by appending the user id to the linked url: echo 'Remove.
Using a session is a bad approach in this situation. You probably just want to pass the user id to the removal confirmation page by appending the user id to the linked url: echo 'Remove'; On the removal confirmation page, you can now access the passed user id with $_GET"user_id".
Exactly! Thanks a lot! – manxing Nov 11 '10 at 11:07.
One way would be to have something along the lines of: // Display the user data echo '' . $row'first_name' .''; echo '' . $row'last_name' .
''; echo '' . $row'nickname' . ''; echo ' ''; So each row in the table has a button, and a hidden field with the id of that record- when you click the submit button you go to the confirmation page and the record id is passed, you can then grab this id to query the DB for the relevant data.
Alternatively, instead of using a form you could also use a hyperlink (or hyperlinked button image).
Many thanks! It really solved my problem! Thank you – manxing Nov 11 '10 at 10:12.
Load your database results that you need into your global $_SESSION variable i.e. Session_start(); $_SESSION'userData' = $queryResultsAsAnArray; Then, reference that in your html, such as: echo '' . $_SESSION'userData''first_name' .''; Or I prefer to load the super global session data in a new variable and use that, like: $userData = $_SESSION'userData'; echo '' .
$userData'first_name' . ''; PHP Session Reference.
No - session storage should not be used for transaction data. Even if you can ensure that users do not use the back and forward buttons, even if you can ensure that they will not open multiple windows, your code will get tied in knots. It's not hard to... echo 'Remove'; is it?
Although really, that kind of operation should be done in a POST rather than a GET (you can have lost of forms on the page, or a single form and javascripts to write a hidden filed and submit the form).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.