PDA

View Full Version : Show Details LINK


rjdineen
07-26-2010, 06:04 PM
Hello everyone. Iam working on a project for a course I am doing.
I am creating a shopping site and have creating a search function.
But i am stuck on a particular Link i need.

Once i search for items on my site. I get results of short descriptions of the items that i search for.

On each item i have a Show Details Link.

I want to click on the link and a new screen opens with full details of item.

I have created a full details page. I am just not sure how to open the full
details screen with the item i want to know more about

Someone please kindly help

Kind Regards

Rob

edbr
07-27-2010, 01:24 AM
you can use behaviours to create a pop up page, im guess in here but if its dynamic then you could make the source of the pop up a common file ie detail.php then supply the detail using the information that you pass to it in the link.

rjdineen
07-27-2010, 08:58 AM
Hello edbr. Thank you for your reply

Yes i have a dedicated details page. But im just not sure how to carry the details from the short details i gain from a search. Onto my full details page.

A bit like when you are searching for a job. You have a list of short descriptions then you want to view a job with every detail.

edbr
07-27-2010, 09:34 AM
if you use a javascript function to open a page
function popup(){

window.open('mywin.php?title=a_value','mywin','wid th=300,height=300', 'menubar=0');

}
where my win is your detail page you pass the value title =a_value.
you can then use $_get to retrieive the value on the detail page

so you can select where id =$_get['title']

rjdineen
07-27-2010, 10:11 AM
I understand that. I have a recordset from the search page to the search results page. The Search button opens my results page with all matching items.

The php server markup for one part of information is

echo $row_itemsearch['prodId']; can i also use this within a
=$_get['title'] ie =$_get['$row_itemsearch['prodId']]

am i on the right track.

Regards

Rob

rjdineen
07-27-2010, 11:21 AM
Below is an example of what i get after searching for an item on my site.
But what i am confused about is. How do i transfer the information onto my Full details page once clicking the full details button. What is the best way to acheive this.


Item ID
Category {ItemSearch.Category}
Quality
Price {ItemSearch.Price}

(button to show full details)
-------------------------------------------------------------
Item ID
Category {ItemSearch.Category}
Quality
Price {ItemSearch.Price}

(button to show full details)
-------------------------------------------------------------
Item ID
Category {ItemSearch.Category}
Quality
Price {ItemSearch.Price}

-------------------------------------------------------------
Item ID
Category {ItemSearch.Category}
Quality
Price {ItemSearch.Price}

(button to show full details)






Kind Regards

Rob

edbr
07-28-2010, 01:44 AM
you can pass it as
'mywin.php?title=<php echo $row_itemsearch['prodId']; ?>'
then retrive it on your detail page (mywin.php i have called it in this example so of course edit it)

you retrieve it as =$_get['title'] echoing the value extracted for the data base so if $row_itemsearch['prodId'] = 1 then the link will be
mywin.php?title=1
then you select statement can be select * from table where id= $_get['title']

rjdineen
07-28-2010, 05:27 PM
ok thank you very much,

i shall try that later on.

Kind Regards

Rob

rjdineen
07-28-2010, 07:50 PM
would i put 'mywin.php?title=<php echo $row_itemsearch['prodId']; ?>'

in the action box with a post method using a link or a button?

Regards

Rob

edbr
07-29-2010, 01:05 AM
no but you could put <php echo $row_itemsearch['prodId']; ?>' as a hidden value then collect it as a $_post
mywin.php would be the action of the form

rjdineen
07-31-2010, 09:52 AM
Hello there.

I have been using the Master Detail Page Set to create a master page and a detail page. I have created both pages with my desired attributes to show when live.

But when i click on an item product view within the detail page. I receive the following error.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Ref = 1 LIMIT 0, 10' at line 1

when i created the master and detail page i noticed within the recordset
it has created the following piece of code

<?php echo $row_itemSearch['']; ?>?recordID=<?php echo $row_itemSearch['item Ref']; ?>

but i do not recognise the recordID. I do not have that anywhere in site.

Do you have any ideas of what i could change or any settings within mysql.


Kind Regards

Rob

edbr
08-02-2010, 01:43 AM
it is pointing to an error in your select statement. are you using dw wizard to create your recordset? if so you have to configure it to collect the value in this example recordID if the value is passed from another page it would be configured as page.php?recordID=value