Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow users to select listings they want to print

Status
Not open for further replies.

pugs421

Technical User
Joined
Nov 25, 2002
Messages
114
Location
US
I making a site with realestate listings and I want to allow the user to select the listings that interest them, and then allow a page to be displayed with all of their selected listings on a that for printing. Could someone point me in the right direction as far as how the user selections should/could be stored. It's pretty much like a shopping cart.
 
I'd put the data in a session variable array. That array to hold the table record ids of the property

As your users find properties in which they're interested, you add values to the array.


Want the best answers? Ask the best questions: TANSTAAFL!!
 
So far in my php experience every time I have a user make a selection that has a value, it is contained in a form that is processed. But in this case there is no form being processed. There is just a display of all the results. If I use a checkbox in each of the listings, how would the entered value be processed? Or could I just make a regular button that somehow has an action to store the result as a session variable? Thanks.
 
I'd just put checkboxes next to all listings. When the form is submitted, those boxes that have been checked will appear in either $_POST or $_GET, but the unchecked boxes will not.

The script to which the form submits can then add the ids of the checked boxes to an array that is a session variable. The session variable can then be available to all scripts.

You can produce a script that displays all the previously-selected "products" -- and give check boxes that allow the user to remove items throught the use of form submission and a submit button with a value of "Update entries".

Want the best answers? Ask the best questions: TANSTAAFL!!
 
There is a site that does what I want to do, but they use a single button image with a javascript onclick assigned to it that I guess stores the value into an array. The user just clicks the button by every listing that they want, and a pop up comes up saying that there selection has been saved on their print list(which they can access whenever).

*Any one know how to implement Javascript onclick to assign values to a variable(or put into an array)?*

Site in question
Note the little scissors that allow you to 'cut' the listing. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top