0

I've got a table that shows details about some products, which are stored in the database. These details are Item Name, Price and submit Date.

Item Name Price Submitted on
Laptop 30ドル 12/04/10
guitar 5ドル 12/05/10

If I click on Laptop I want to see all details such as Title, Price, Description, Picture, Contact name and email (all details are stored in the database) in a new windows.

I don't know if a PHP function will do it or maybe I need javascript?? I look on Google but I could find anything.

I hope you undestand my question

asked Aug 12, 2010 at 13:51
1
  • 5
    You've been told how to do it. My advice is don't do it. Automatically opening new windows is almost always annoying. Commented Aug 12, 2010 at 14:02

4 Answers 4

4

Here is how you open a link in a new window.

<a href="detailsPage.php?itemID=1234" target="_blank">Name of your Product</a>
answered Aug 12, 2010 at 13:53
Sign up to request clarification or add additional context in comments.

Comments

2

This doesn't really have anything to do with PHP or MySQL.

Depending on the version of (X)HTML you're using you can either set the target attribute on the link...

<a href="..." target="_blank">...</a>

...or you can use a JavaScript function that makes use of window.open.

answered Aug 12, 2010 at 13:58

Comments

1

There is no function in PHP for this as PHP runs on the server end. You would need to generate the HTML or JavaScript to do this either using the target="_blank" attribute on a link, or using JavaScript's window.open, depending on the desired result.

answered Aug 12, 2010 at 14:00

Comments

0

You don't need java script or PHP.

This can be achieved by HTML.

<a href="xyz.php" target="_blank">Product</a>

target="_blank" is a attribute of <a> tag. Using this link can be opened in new window.

answered Aug 13, 2010 at 6:51

1 Comment

Thank you very much for your help!! all answers were very useful!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.