Jump to content

Linking into a frameset from external URL


dannel77

Recommended Posts

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=100090C

The 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 variables
require("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 connection
mysql_connect("$host","$user","$pass");

// database selection
mysql_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:&nbsp;</B> $row[5]</FONT>&nbsp;&nbsp;<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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.