Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with this snippet... 1

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
I have this snippet of code that was written by somone else and am trying to configure to work with my needs...

$info_box_contents = array();
$info_box_contents[] = array('text' => $categories_string);
$info_box_contents[] = array('align' => 'left', 'text' => '<br><a href="' . tep_href_link('product_info.php', '', 'NONSSL') . '">' . Inspections . '</a>');

This is used to not lose the session id... however I need to access a specific product referred to as product_id...

I have tried:
'product_info.php?product_ID=6&'

When I use this it shows this in the address bar:

however it goes back to the index page... however if I click
another link it displays the same address in the address bar but goes to the product page.

If I leave it as:
'product_info.php'
then it goes to the product page and has the session ID but no product...

How can I get it to list product_id as 6?

I hope I made sense...
 
Actually products_id is correct... product_id was the typo :)

Thank you though...
 
What about:
Code:
'<br><a href="' . tep_href_link('product_info.php', '', 'NONSSL') . '&products_id='.$products_id.'">Inspections</a>'
Putting the products_id with the ampersand after the session ID. Have you tried?
 
If I wanted to manually set it to 6 instead of the variable how would you do that?

In the actual address of the product the products_id is listed prior to the session id... dunno if that matters...
 
The order of URL parameters does not matter. They will be available to the receiving script in $_GET['paramName'] and are accessed via the varname.
Static set to "6":
Code:
'<br><a href="' . tep_href_link('product_info.php', '', 'NONSSL') . '&products_id=6">Inspections</a>'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top