Hi,
I know how to display the multiple records in a table with a few selected columns.
But there are more details that I cant display in the same tabular page.
Therefore, when i click on any of the first values of a index col of any record, i should be displaying a full detailed page of that record.
So please verify with me. I would need to store the id of the record i click (each index value in the col for every record will be hyperlinked), which in turn is stored in hidden value.
Then i query the db to return the full complete record matching that id. Now heres the problem how can i make it display the results in a new frame or new window at the instance event of click????
Many thanks,
Lak.
How to display sub-detail page from tabular page
How to display sub-detail page from tabular page
Last edited by jacek on Thu Feb 23, 2012 11:12 pm, edited 1 time in total.
Reason: Fixed title.
Reason: Fixed title.
Re: Hw to display sub-detail page from tabular page
In your first table you can link to another page like view_item.php?id=<the_id> then on the second list you can link to view_details.php?item_id=$_GET['id']&id=<the_id>
Essentially this will keep the id in the URL.
Essentially this will keep the id in the URL.
Re: Hw to display sub-detail page from tabular page
hey jacek can u explain this more further in detail coding...
simple codings for both
simple codings for both
Re: How to display sub-detail page from tabular page
Well say you have you first page that shows the list of all records, the id of each one could be linked to a new page like this
You can get the id in the new page by using $_GET['id'] and use that to decide which row from the database to take the information form.
<a href="view_record.php?id=<?php echo $record['id']; ?>">Some Text</a>Then when clicked it will take the user to the page view_record.php?id=7 where 7 would be replaced with that records ID.
You can get the id in the new page by using $_GET['id'] and use that to decide which row from the database to take the information form.
Re: How to display sub-detail page from tabular page
Can I do it without the url param passing... like a function call to class...it would need the "require" statement...
So the <a href> perhaps would hv the call statement.... is this possible...???
By the way guys i want to verify
<?php Class className functionName(){ } ?> ok..so save this using className as fileName.php.... is it the same as className.java
So the <a href> perhaps would hv the call statement.... is this possible...???
By the way guys i want to verify
<?php Class className functionName(){ } ?> ok..so save this using className as fileName.php.... is it the same as className.java
Re: How to display sub-detail page from tabular page
Not really no, Think of it in terms of page requests. Once your browser is done loading the first page it closes the connection completely and reopens a new one when you click the link. There is no way for it to send information to the server other than through the URL requested.lakc wrote:Can I do it without the url param passing... like a function call to class...it would need the "require" statement...
So the <a href> perhaps would hv the call statement.... is this possible...???
You can save it as whatever you like really. The accepted standard seems to be the same as Java so className would be in ClassName.php. I tend to ignore this and save class_name in class_name.inc.php just because that's what I'm used to.lakc wrote:<?php Class className functionName(){ } ?> ok..so save this using className as fileName.php.... is it the same as className.java