Jump to content

Recommended Posts

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)?

Link to comment
Share on other sites


...or session variables.

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.

Edited by WBHoenig
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...