Jump to content

[SOLVED] PHP link


Xeven

Recommended Posts

Can anyone exlpain how this is done or how I am able to do this.  Basically I have the following

echo "<td width='200'>".$row['pd_name']."</td>";

 

Where 'pd_name' is a field in a table which contains lots of names pretty much.  Now I can display all these names in a table, simple.  But what I am having problems with is making a link from that name which has been generated.  I want the link to pass the 'pd_name' information to a page called details.php and from there I need to be able to pull all details from the generated name.

 

If that makes any sense at all.  I am trying as best as possible to explain my little problem so I hope it makes sense.

 

I thought that the echo statement would go something like

echo "<td width='200'>""<a href='product.php? "ID OF THE NAME HERE" .$row['pd_name']."</td>";

I just have no idea how I can get the id to be generated for that link.

 

Any help would be great.

Link to comment
https://forums.phpfreaks.com/topic/100212-solved-php-link/
Share on other sites

Haha, I was thinking I must be able to define the field names and then use them to try and do it.  Thanks Graham that worked like a treat. 

 

So when I write up the product.php page how would I pass the product_id to the next page to be able to create a mysql query on that product?

 

Thanks again!

Link to comment
https://forums.phpfreaks.com/topic/100212-solved-php-link/#findComment-512433
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.