dannel77 Posted January 3, 2007 Share Posted January 3, 2007 Hi,I am trying to make it possible to link to a product page on our website from an external link, directly into the frameset of our site. If someone could help me solve this I'd be really greatful.A direct link (from an external URL) to a product page looks like this: http://www.myhomepage.se/item_show.php?code_no=100090CThe index.php as it looks now:[code]<frameset cols="*,900,*" framespacing="0" frameborder="0" border="0"> <frame name="left" frameborder="0" scrolling="no" src="bg_left.php" noresize marginwidth="0" marginheight="0"> <frame name="center" src="main_frame.php" frameborder="0" noresize marginwidth="0" marginheight="0"> <frame name="right" frameborder="0" scrolling="no" src="bg_right.php" noresize marginwidth="0" marginheight="0"></frameset>[/code]main_frame.php as it is now:[code]<frameset rows="129,50%" border="0" frameborder="0" marginwidth="0" marginheight="0"> <frame src="top.php" name="top" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" target="main" scrolling="no"> <frameset rows="92%,40" border="0" frameborder="0"> <frameset cols="182,80%" border="0" frameborder="0"> <frame src="menu_tree.php" name="categories" marginwidth="7" marginheight="6" frameborder="0" target="main" scrolling="auto"> <frame src="main.php" name="main" marginwidth="10" marginheight="7" frameborder="0" target="_self" scrolling="auto" noresize="noresize"> </frameset> <frameset cols="171,80%" border="0" frameborder="0"> <frame src="middle_left.php" name="cart" noresize="noresize" marginwidth="0" marginheight="0" border="0" frameborder="0" scrolling="no"> <frame src="empty.php" name="middle_right" marginwidth="0" marginheight="0" frameborder="0" target="main" scrolling="no"> </frameset> </frameset> </frameset>[/code]item_show.php:[code]<?php// required variablesrequire("config.php");$code_no = mysql_escape_string($_REQUEST['code_no']); ?><html><head><title>Product list</title><link rel="stylesheet" HREF="master_style.css"></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#000000" ALINK="#F70404"><center><?php// database connectionmysql_connect("$host","$user","$pass");// database selectionmysql_select_db("$database");// query to get the products of type $category$result = mysql_query("select * from products where(code_no = '$code_no') ORDER BY 'item'");echo "<FORM NAME=\"itemsform\"><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=16>";while($row = mysql_fetch_row($result)) {echo "<TR ALIGN=Left VALIGN=Top><TD><a href=\"item_show2.php?code_no=$row[2]\" TARGET=\"main\"><IMG SRC=\"medium/$row[6]\" BORDER=\"0\"></A></TD><TD WIDTH=\"100%\"><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><B>$row[3]</B></FONT><P><P><font style=\"font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;\">$row[4]</FONT><P><TABLE border=0><TD><font style=\"font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;\"><B>$txt_price $txt_currency: </B> $row[5]</FONT> <INPUT TYPE=\"hidden\" NAME=\"id$row[2]quant\" VALUE=\"1\"</TD><TD Valign=top><a href=\"Javascript:top.center.cart.addItem('$row[3]','$row[5]', document.itemsform.id$row[2]quant.value, '$row[2]', '$row[7]')\"><img src=\"images/buy.gif\" border=\"0\"></a></TD></TR></TABLE>";}?></TABLE>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.