Creating A View

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
brmcdani44
Forum Commoner
Posts: 26
Joined: Fri Oct 08, 2010 3:52 pm

Creating A View

Post by brmcdani44 »

Iam currently developing an application that displays event details. I do not want to show all of the details on the index page though. I would like to show around 3 data fields and then have a "Click here to learn more" link that will bring the user to a more detailed view of their selection. I tried Googling some lingo to find some samples on how to get this accomplished but did not have any luck. Can someone please point me in the right direction on this issue? Thanks for your help in advance.
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: Creating A View

Post by twinedev »

Select the fields you want to display, loop through them displaying them with a link to a .php page that will display all the details, passing it in the url eventid=### that ### beign the primary key from the table.

-Greg
loCode
Forum Newbie
Posts: 9
Joined: Fri Oct 08, 2010 2:24 am

Re: Creating A View

Post by loCode »

AJAX would make this operation a lot more fancy.

Detail 1
Detail 2
Detail 3

[Show More] <--click here (Calls AJAX, Inserts return below)
|
|
v
Detail 4
Detail 5
Detail 6
ETC

Make it even more fancy by creating a toggle link, so to hide the extra details later.

Without AJAX, just load 3 details in a visible div, and hide the rest, the link now unhides the rest.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Creating A View

Post by Christopher »

Search for "pagination" and you will find information and sample code.
(#10850)
brmcdani44
Forum Commoner
Posts: 26
Joined: Fri Oct 08, 2010 3:52 pm

Re: Creating A View

Post by brmcdani44 »

Thanks for all of your replies. I have not done any work with AJAX but really want to start. This would be a great place to begin!
Post Reply