There will be no code because I haven't the slightest idea of how I will do this. But what I am working on is a Control Panel for my customer. What she needs done is a page where she can see all the artists she has in the database which she can checkmark which to edit (DONE). When all selected artists are checked, their names are sent in POST data to another page which displays the VALUES in input text boxes. This will be so she can change the name of the artist if she misspelled them when she added them. Problem is when I do the php/mysql update, i dont know how to specify the WHERE parameter. I would do WHERE name = '$last_name' but the last name gets lost and only the edited name gets passed along. How would I go about sending along the original name along with the edited one (or an ID as each artist has an ID field)?
Page 1 of 1
PHP Help
#2
Posted 05 December 2006 - 06:59 PM
#3
Posted 07 December 2006 - 07:50 PM
...or session variables.
To do this with session vars, just put the following at the top of each page:
Then, set what you want to keep as a session variable, just like a post variable.
You can then reference it from any page, as it is passed along on the server.
Of course, this isn't exactly the most safe method in the world; nor is it perfect feature wise. But it works for starters.
To do this with session vars, just put the following at the top of each page:
<?php session_start(); ?>.
Then, set what you want to keep as a session variable, just like a post variable.
<?php $_SESSION['var_name'] = 'whatever'; ?>
You can then reference it from any page, as it is passed along on the server.
<?php echo $_SESSION['var_name']; ?>
Of course, this isn't exactly the most safe method in the world; nor is it perfect feature wise. But it works for starters.
This post has been edited by WBHoenig: 07 December 2006 - 07:53 PM
- ← How to execute javascript on a WebBrowser control?
- Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
- Garbage Characters in DataSet when database is Remote. →
Share this topic:
Page 1 of 1



Help
Back to top










