hyperlinking PHP/SQL search results

This is a discussion on "hyperlinking PHP/SQL search results" within the PHP Forum section. This forum, and the thread "hyperlinking PHP/SQL search results are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 20th, 2008, 17:01
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
hyperlinking PHP/SQL search results

Heyyyyy all

haha under the advice of the wise Monie I have switched to creating in php/SQL over ASP/Access and what wise move that was.

Okay heres my problem. I have produced an ecommerce website and have created catergory pages for my products. The list of products and thier attribuets are also displayed.

for example see this website. It shows all the products under 'Amino Acid' http://www.discount-supplements.co.u...pplements&t=lb

So far so good this is what I have achieved.

However, now I would like to make my results or at least the name of the product a link to thier own indavidual webpages. I have created the indavidual webpages so now it is just a case of making the results hyperlinkable.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 20th, 2008, 17:09
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

All the categories seem to link ok in ff.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 20th, 2008, 17:13
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Quote:
Originally Posted by dab42pat View Post
All the categories seem to link ok in ff.
Hi Dab


that website is mine mate, i just used it as an exaple of all the products being displayed in the Amino Acid category and then the results being hyperlinked to thier indavidual pages.

The hyperlinking of data pulled from my SAL database is the part I dont know how to do

P.S your wifes site can be distracting hahaha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 20th, 2008, 17:38
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Are you using Mysql db. If so you may have to create a field in your products called hyper_link or something. Then make sure its referenced in your search results. eg.

PHP: Select all

<a href="<?php echo $row_Recordset1['hyper_link']; ?>"><span class="style2">£<?php echo $row_Recordset1['item_price']; ?></span></a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 20th, 2008, 19:56
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Quote:
Originally Posted by dab42pat View Post
Are you using Mysql db. If so you may have to create a field in your products called hyper_link or something. Then make sure its referenced in your search results. eg.

PHP: Select all

<a href="<?php echo $row_Recordset1['hyper_link']; ?>"><span class="style2">£<?php echo $row_Recordset1['item_price']; ?></span></a>

Hi Dab thanks for your reply.

I think I understand what you mean. I am usuing MySQL in SQLyog and PHP.

So from what you mean I would make the lets say the data in 'Product_Name' hyperlinkable.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Mar 20th, 2008, 20:23
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Say you have a products table and in that you have product_name, product_description etc. add a field hyper_link and insert the link in that field eg showitem.php?item_id=1. Then you can call it using something similar to the code I posted above.

I hope this makes sense,

Pat


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Mar 20th, 2008, 20:43
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Quote:
Originally Posted by dab42pat View Post
Say you have a products table and in that you have product_name, product_description etc. add a field hyper_link and insert the link in that field eg showitem.php?item_id=1. Then you can call it using something similar to the code I posted above.

I hope this makes sense,

Pat


Hey Pat

it does make sense. I am just trying to picture the output. So on the website next to all the products details there would be a 'http://www' link.

Example

Fiest : Ford : 2 seater : £15.000 : www.fordfiestapage.com

Although this would sove the problem I wouldnt like a full link on the end is there away i can disguise it into just a word say 'view details'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Mar 20th, 2008, 20:52
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

No, by using the code I posted or something similar the link would be attached to your product name, so when the user clicked your product name it would link to the hyper_link set in the database for that product.

A working example is on my wifes site, if you enter baby in the search field and look at the results I have hyperlinked the image using this process.

I'm not great at explaining things.

Pat
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Mar 21st, 2008, 10:05
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Quote:
Originally Posted by dab42pat View Post
No, by using the code I posted or something similar the link would be attached to your product name, so when the user clicked your product name it would link to the hyper_link set in the database for that product.

A working example is on my wifes site, if you enter baby in the search field and look at the results I have hyperlinked the image using this process.

I'm not great at explaining things.

Pat
I understand your a superstar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Mar 26th, 2008, 16:09
Junior Member
Join Date: Jan 2008
Location: England
Age: 23
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: hyperlinking PHP/SQL search results

Quote:
Originally Posted by dab42pat View Post
No, by using the code I posted or something similar the link would be attached to your product name, so when the user clicked your product name it would link to the hyper_link set in the database for that product.

A working example is on my wifes site, if you enter baby in the search field and look at the results I have hyperlinked the image using this process.

I'm not great at explaining things.

Pat
Pat you dont have a tutorial on how to make something hyperlinkable in your SQL database. Either am typing the wrong thing in google but I cant find any tutorials
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Search results like these (link) skuliaxe PHP Forum 4 Jan 28th, 2008 11:28
[SOLVED] Displaying search results on a different page longstand PHP Forum 4 Nov 19th, 2007 22:26
search results with servlet or JSP twix_ Other Programming Languages 1 Nov 2nd, 2006 21:25
Index Server search results problem starrbuck Classic ASP 0 Feb 22nd, 2006 17:20


All times are GMT. The time now is 08:06.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42