Jump to content

how to fix the session code problem


m118

Recommended Posts

I use session code to keep post data. It does not work well .  I have put the program on the web site. This is the link .  http://www.ptiimaging.ca/xx.php 

 

The program is for the whole web page. 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<link rel="stylesheet" type="text/css" href="mainpage.css" />

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>&#26080;&#26631;&#39064;&#25991;&#26723;</title>

</head>

<body>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<link rel="stylesheet" type="text/css" href="mainpage.css" />

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>&#26080;&#26631;&#39064;&#25991;&#26723;</title>

</head>

<body>

<div class="block"> <div class="logo">

 

<img src="images/ptiwci_logo_btrfly.jpg" />

 

<div class="boxlog">

<strong><p class="name">Nizar Goa</p></strong><br />

<em class="wordsinlogo">Managing Director</em><br />

<p class="details">#101, 17873-106A Avenue</p><br />

<p class="details">Edmonton,AB T5S 1V8</p><br />

<p class="details">PH (780) 452-3801</p><br />

<p class="details">FAX (780) 452-3832</p><br />

<p class="details">Cell (780)498-2072</p><br />

<p class="details">ptican@telus.net</p>

</div>

 

<p class="lastwords">Toners . Inkjets . Ribbons . Datamedia . Printers</p>

</div>

 

<div id="navcontainer">

<ul>

<li><a href="index.php">Home</a></li>

<li><a href="company.php">Company</a></li>

<li><a href="product.php">Product</a></li>

<li><a href="contract.php">Contract us</a></li>

<li><a href="bestseller.php">Top seller</a></li>

<li><a href="new.php">New product</a></li>

</ul>

</div>

<div class="searchbox">

<form action="table3.php" method="post">

 

<input type="submit" name="submit" value="submit" />

 

 

<input type="text" name="search" />

 

 

</form>

 

 

 

 

<p>Please search by OEM number</p>

 

 

 

 

 

 

 

</div>

<div class="clear"></div>

<div class="rollingpicture left">

<object id="bcastr4" data="bcastr4.swf?xml=bcastr.xml" type="application/x-shockwave-flash" width="610.584" height="220">

<param name="movie" value="bcastr4.swf" />

</object>

</div>

<div class="xsnazzy">

<b class="xtop"><b class="xb1"></b><b class="xb2 color_a">

</b><b class="xb3 color_a"></b><b class="xb4 color_a"></b></b>

<div class="xboxcontent">

<h1 class="color_a">search</h1>

 

<form action="xx.php" method="post">

<select name="brand">

<option >brand</option>

<option value="Apple">Apple</option>

 

<option value="brother">Brother</option>

<option value="Canon">Canon</option>

<option value="Dell">Dell</option>

<option value="Epson">Epson</option>

<option value="HP">HP</option>

<option value="lexmark">Lexmark</option>

<option value="Samsung">Samsung</option>

<option value="Sharp">Sharp</option>

<option value="IBM">IBM</option>

<option value="Lenovo">Lenovo</option>

<option value="Konica-Minolta">Konica-Minolta</option>

 

<option value="okidata">okidata</option>

<option value="Mita">Mita</option>

<option value="Ricoh">Ricoh</option>

<option value="Source technology">Source technology</option>

<option value="Standard Register">Standard Register</option>

<option value="Tally Genicom">Tally Genicom</option>

<option value="Tektronix">Tektronix</option>

<option value="Toshiba">Toshiba</option>

<option value="Unisys">Unisys</option>

<option value="Xerox">Xerox</option>

<option value="Xerox Ink Stricks">Xerox Ink Sticks</option>

<option value="kyocera">kyocera</option>

<option value="Postage Meters">Postage Meters</option>

</select>

<br />

<select name="sort">

<option >kind</option>

<option value="Copier Toner">Copier Toner</option>

<option value="Laser Toner">Laser Toner</option>

<option value="MICR Toner">MICR Toner</option>

<option value="Inkjet">Inkjet</option>

 

 

 

 

 

</select><Br />

<select name="type">

<option >for</option>

<option value="PC">Photo copier</option>

<option value="Fax">Fax</option>

<option value="Copier">Copier</option>

<option value="Cheque">Cheque</option>

<option value="Print">Printer</option>

<option value="Copier/Fax">Copier/Fax</option>

</select> <br />

 

 

<input type="submit" value="submit" name="submit" />

</form>

</div>

<b class="xbottom"><b class="xb4"></b><b class="xb3"></b>

<b class="xb2"></b><b class="xb1"></b></b>

</div>

<div class="leftlist left">

<div class="nextbox"><strong>

<center>

Inkjet

</center>

</strong></div>

<ul>

<li><a href="table.php?id=<?php echo "Brother" ;?>&cd=<?php echo "Inkjet"; ?>">Brother</a></li>

<li><a href="table.php?id=<?php echo "Kodak" ;?>&cd=<?php echo "Inkjet"; ?>">Kodak</a></li>

<li><a href="table.php?id=<?php echo "PitenyBowes-PostageMeter&Franking system" ;?>&cd=<?php echo "Inkjet"; ?>">PitenyBowes-PostageMeter</a></li>

<li><a href="table.php?id=<?php echo "Canon" ;?>&cd=<?php echo "Inkjet"; ?>">Cannon</a></li>

<li><a href="table.php?id=<?php echo "Dell" ;?>&cd=<?php echo "Inkjet"; ?>">Dell</a></li>

<li><a href="table.php?id=<?php echo "HP" ;?>&cd=<?php echo "Inkjet"; ?>">HP</a></li>

<li><a href="table.php?id=<?php echo "Lexmark" ;?>&cd=<?php echo "Inkjet"; ?>">Lexmark</a></li>

<li><a href="table.php?id=<?php echo "Samsung" ;?>&cd=<?php echo "Inkjet"; ?>">Samsung</a></li>

<li><a href="table.php?id=<?php echo "sharp" ;?>&cd=<?php echo "Inkjet"; ?>">sharp</a></li>

<li><a href="table.php?id=<?php echo "Xerox" ;?>&cd=<?php echo "Inkjet"; ?>">Xerox</a></li>

</ul>

<div class="nextbox"><strong>

<center>

Laser/MICR/Fax/TFR

</center>

</strong></div>

<ul>

<li><a href="table.php?id=<?php echo "Apple" ;?>&cd=<?php echo " Toner"; ?>">Apple</a></li>

<li><a href="table.php?id=<?php echo "Brother" ;?>&cd=<?php echo " Toner"; ?>">Brother</a></li>

<li><a href="table.php?id=<?php echo "Canon" ;?>&cd=<?php echo " Toner"; ?>">Canon</a></li>

<li><a href="table.php?id=<?php echo "Dell" ;?>&cd=<?php echo " Toner"; ?>">Dell</a></li>

<li><a href="table.php?id=<?php echo "Epson" ;?>&cd=<?php echo " Toner"; ?>">Epson</a></li>

<li><a href="table.php?id=<?php echo "HP" ;?>&cd=<?php echo " Toner"; ?>">HP</a></li>

<li><a href="table.php?id=<?php echo "IBM/Lenovo" ;?>&cd=<?php echo " Toner"; ?>">IBM/Lenovo</a></li>

 

<li><a href="table.php?id=<?php echo "Kyocera/Mita" ;?>&cd=<?php echo " Toner"; ?>">Kyocera/Mita</a></li>

<li><a href="table.php?id=<?php echo "Konica-Minolta/Minolta QMS " ;?>&cd=<?php echo " Toner"; ?>"> Konica-Minolta/Minolta QMS </a></li>

<li><a href="table.php?id=<?php echo "Konica" ;?>&cd=<?php echo " Toner"; ?>">Konica</a></li>

 

<li><a href="table.php?id=<?php echo "Lexmark" ;?>&cd=<?php echo " Toner"; ?>">Lexmark</a></li>

<li><a href="table.php?id=<?php echo "Minolta" ;?>&cd=<?php echo " Toner"; ?>">Minolta</a></li>

<li><a href="table.php?id=<?php echo "Okidata" ;?>&cd=<?php echo " Toner"; ?>">Okidata</a></li>

<li><a href="table.php?id=<?php echo "Ricoh" ;?>&cd=<?php echo " Toner"; ?>">Ricoh</a></li>

<li><a href="table.php?id=<?php echo "Samsung" ;?>&cd=<?php echo " Toner"; ?>">Samsung</a></li>

 

<li><a href="table.php?id=<?php echo "TallyGenicom" ;?>&cd=<?php echo " Toner"; ?>">Tally Genicom</a></li>

<li><a href="table.php?id=<?php echo "Tektronix" ;?>&cd=<?php echo " Toner"; ?>">Tektronix</a></li>

<li><a href="table.php?id=<?php echo "Toshiba" ;?>&cd=<?php echo " Toner"; ?>">Toshiba</a></li>

<li><a href="table.php?id=<?php echo "Unisys" ;?>&cd=<?php echo " Toner"; ?>">Unisys</a></li>

<li><a href="table.php?id=<?php echo "Xerox" ;?>&cd=<?php echo " Toner"; ?>">Xerox</a></li>

<li><a href="table.php?id=<?php echo "Xero Ink Sticks" ;?>&cd=<?php echo " Toner"; ?>">Xerox Ink Sticks</a></li>

<li><a href="table.php?id=<?php echo "Gestetner" ;?>&cd=<?php echo " Toner"; ?>">Gestetner</a></li>

<li><a href="table.php?id=<?php echo "Lanier" ;?>&cd=<?php echo " Toner"; ?>">Lanier</a></li>

<li><a href="table.php?id=<?php echo "TROY" ;?>&cd=<?php echo " Toner"; ?>">TROY</a></li>

<li><a href="table.php?id=<?php echo "Lexmark/Troy" ;?>&cd=<?php echo " Toner"; ?>">Lexmark/Troy</a></li>

<li><a href="table.php?id=<?php echo "Okidata" ;?>&cd=<?php echo " Toner"; ?>">Okidata</a></li>

<li><a href="table.php?id=<?php echo "Sharp" ;?>&cd=<?php echo " Toner"; ?>">Sharp</a></li>

<li><a href="table.php?id=<?php echo "Piteny Bowes /Imagistics" ;?>&cd=<?php echo " Toner"; ?>">Piteny Bowes /Imagistics</a></li>

<li><a href="table.php?id=<?php echo "Panasonic" ;?>&cd=<?php echo " Toner"; ?>">Panasonic</a></li>

<li><a href="table.php?id=<?php echo "Savin" ;?>&cd=<?php echo " Toner"; ?>">Savin</a></li>

<li><a href="table.php?id=<?php echo "HP/ Troy" ;?>&cd=<?php echo " Toner"; ?>">HP/ Troy</a></li>

<li><a href="table.php?id=<?php echo "Source Technologies" ;?>&cd=<?php echo " Toner"; ?>">Source Technologies</a></li>

 

<li><a href="table.php?id=<?php echo "Ricoh/SindoRicoh" ;?>&cd=<?php echo " Toner"; ?>">Ricoh/SindoRicoh</a></li>

<li><a href="table.php?id=<?php echo "Royal Copystar/Copystar" ;?>&cd=<?php echo " Toner"; ?>"> Royal Copystar/Copystar</a></li>

<li><a href="table.php?id=<?php echo "Source Technologies" ;?>&cd=<?php echo " Toner"; ?>"> Standard Register</a></li>

 

 

</ul>

</div>

<div class="boxright right">

<?php

 

include("connection.php");

 

session_start();

 

$_SESSION['brand']=$_POST['brand'];

$_SESSION['type']=$_POST['type'];

$_SESSION['sort']=$_POST['sort'];

 

if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };

$start_from = ($page-1) * 23;

 

 

$select="select * from $chun where  brand = '$_SESSION[brand]'  or sort='$_SESSION[sort]' or type ='$_SESSION[type]'  LIMIT $start_from, 18";

 

 

$result2=mysql_query($select, $connection) or die (mysql_error());

 

 

 

?>

<h1 >Inkjet and Toner Cartridges for the printing device </h1>

<p class="writeword">PTi is a leading Remanufacturer and distributor of compatible cartridges and orginal product. We also offer the most comprehensive selection of remanufactured ink cartridges for HP printers at low prices. Along with our 100% Quality Guaranteed HP toner cartridges, we also offer high quality compatible inkjet cartridges for many printers at highly competitive prices. All our products are proudly manufactured in the U.S.A.

 

Enter your search criteria at the top of the page to view details on a specific cartridge. For our award winning customer service, call (780) 4523801 </p>

<table class="tableinsert">

<tr>

 

<th>Pti Item#</th>

<th>OEM Part#</th>

<th>Machine Compatibilty</th>

<th>Color</th>

<th>Dealer price</th>

<th>OEM Price</th>

</tr>

<?php

 

 

 

while ($row=mysql_fetch_array($result2)) {

 

 

 

 

?>

<tr>

 

<td><?php echo $row['item'];?></td>

<td><a href="ddl.php?wd=<?php echo $row['id'] ;?>"><?php echo $row['oempart'];?></a></td>

<td><?php echo $row['compatibility'];?></td>

<td><?php echo $row['colorful'];?></td>

 

 

<td>$<?php echo $row['comprice']; ?></td>

<td><?php echo $row['oemprice']; ?></td>

</tr>

<?php

 

 

 

};

 

 

?>

</table>

<?php

$sql = "select count(*) from $chun  where    brand = '$_SESSION[brand]' or  type ='$_SESSION[type]' or sort='$_SESSION[sort]'  ";

 

$rs_result = mysql_query($sql,$connection);

$row = mysql_fetch_row($rs_result);

$total_records = $row[0];

$total_pages = ceil($total_records / 23);

 

for ($i=1; $i<=$total_pages; $i++) {

 

 

 

?>

 

 

<div class="trunpage"><a href='table2.php?page=<?php echo  "$i" ; ?>&id=<?php echo $_SESSION['brand'];?>&cd=<?php echo $_SESSION['type'];?>&td=<?php echo $_SESSION['sort'];?>'  ><?php echo  "$i" ; ?></a>

   

        </div>

 

 

 

<?php

}

?>

 

 

</div>

<div class="lineone"></div>

 

<div class="footer">

<p>Copyright 2007-2010 www.ptiimaging.ca Inc. Canada All rights reserved.

You can reach us at : By Mail: 17873 106a ave, Unit 101 Edmontn Alberta T5S 1V8 By phone: 1-780-452-3801 By Fax: 1-780-452-3832 By email: ptican@telus.net </p>

</div>

 

</div>

</body>

</html>

 

 

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="mainpage.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>&#26080;&#26631;&#39064;&#25991;&#26723;</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="mainpage.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>&#26080;&#26631;&#39064;&#25991;&#26723;</title>
</head>
<body>
<div class="block"> <div class="logo">

<img src="images/ptiwci_logo_btrfly.jpg" />

<div class="boxlog">
<strong><p class="name">Nizar Goa</p></strong><br />
<em class="wordsinlogo">Managing Director</em><br />
<p class="details">#101, 17873-106A Avenue</p><br />
<p class="details">Edmonton,AB T5S 1V8</p><br />
<p class="details">PH (780) 452-3801</p><br />
<p class="details">FAX (780) 452-3832</p><br />
<p class="details">Cell (780)498-2072</p><br />
<p class="details">ptican@telus.net</p>
</div>

<p class="lastwords">Toners . Inkjets . Ribbons . Datamedia . Printers</p>
</div>

<div id="navcontainer">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="company.php">Company</a></li>
<li><a href="product.php">Product</a></li>
<li><a href="contract.php">Contract us</a></li>
<li><a href="bestseller.php">Top seller</a></li>
<li><a href="new.php">New product</a></li>
</ul>
</div>
<div class="searchbox">
<form action="table3.php" method="post">

<input type="submit" name="submit" value="submit" />


<input type="text" name="search" />


</form>




<p>Please search by OEM number</p>







</div>
<div class="clear"></div>
<div class="rollingpicture left">
<object id="bcastr4" data="bcastr4.swf?xml=bcastr.xml" type="application/x-shockwave-flash" width="610.584" height="220">
<param name="movie" value="bcastr4.swf" />
</object>
</div>
<div class="xsnazzy">
<b class="xtop"><b class="xb1"></b><b class="xb2 color_a">
</b><b class="xb3 color_a"></b><b class="xb4 color_a"></b></b>
<div class="xboxcontent">
<h1 class="color_a">search</h1>

<form action="xx.php" method="post">
<select name="brand">
<option >brand</option>
<option value="Apple">Apple</option>

<option value="brother">Brother</option>
<option value="Canon">Canon</option>
<option value="Dell">Dell</option>
<option value="Epson">Epson</option>
<option value="HP">HP</option>
<option value="lexmark">Lexmark</option>
<option value="Samsung">Samsung</option>
<option value="Sharp">Sharp</option>
<option value="IBM">IBM</option>
<option value="Lenovo">Lenovo</option>
<option value="Konica-Minolta">Konica-Minolta</option>

<option value="okidata">okidata</option>
<option value="Mita">Mita</option>
<option value="Ricoh">Ricoh</option>
<option value="Source technology">Source technology</option>
<option value="Standard Register">Standard Register</option>
<option value="Tally Genicom">Tally Genicom</option>
<option value="Tektronix">Tektronix</option>
<option value="Toshiba">Toshiba</option>
<option value="Unisys">Unisys</option>
<option value="Xerox">Xerox</option>
<option value="Xerox Ink Stricks">Xerox Ink Sticks</option>
<option value="kyocera">kyocera</option>
<option value="Postage Meters">Postage Meters</option>
</select>
<br />
<select name="sort">
<option >kind</option>
<option value="Copier Toner">Copier Toner</option>
<option value="Laser Toner">Laser Toner</option>
<option value="MICR Toner">MICR Toner</option>
<option value="Inkjet">Inkjet</option>





</select><Br />
<select name="type">
<option >for</option>
<option value="PC">Photo copier</option>
<option value="Fax">Fax</option>
<option value="Copier">Copier</option>
<option value="Cheque">Cheque</option>
<option value="Print">Printer</option>
<option value="Copier/Fax">Copier/Fax</option>
</select> <br />


<input type="submit" value="submit" name="submit" />
</form>
</div>
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b>
<b class="xb2"></b><b class="xb1"></b></b>
</div>
<div class="leftlist left">
<div class="nextbox"><strong>
<center>
Inkjet
</center>
</strong></div>
<ul>
<li><a href="table.php?id=<?php echo "Brother" ;?>&cd=<?php echo "Inkjet"; ?>">Brother</a></li>
<li><a href="table.php?id=<?php echo "Kodak" ;?>&cd=<?php echo "Inkjet"; ?>">Kodak</a></li>
<li><a href="table.php?id=<?php echo "PitenyBowes-PostageMeter&Franking system" ;?>&cd=<?php echo "Inkjet"; ?>">PitenyBowes-PostageMeter</a></li>
<li><a href="table.php?id=<?php echo "Canon" ;?>&cd=<?php echo "Inkjet"; ?>">Cannon</a></li>
<li><a href="table.php?id=<?php echo "Dell" ;?>&cd=<?php echo "Inkjet"; ?>">Dell</a></li>
<li><a href="table.php?id=<?php echo "HP" ;?>&cd=<?php echo "Inkjet"; ?>">HP</a></li>
<li><a href="table.php?id=<?php echo "Lexmark" ;?>&cd=<?php echo "Inkjet"; ?>">Lexmark</a></li>
<li><a href="table.php?id=<?php echo "Samsung" ;?>&cd=<?php echo "Inkjet"; ?>">Samsung</a></li>
<li><a href="table.php?id=<?php echo "sharp" ;?>&cd=<?php echo "Inkjet"; ?>">sharp</a></li>
<li><a href="table.php?id=<?php echo "Xerox" ;?>&cd=<?php echo "Inkjet"; ?>">Xerox</a></li>
</ul>
<div class="nextbox"><strong>
<center>
Laser/MICR/Fax/TFR
</center>
</strong></div>
<ul>
<li><a href="table.php?id=<?php echo "Apple" ;?>&cd=<?php echo " Toner"; ?>">Apple</a></li>
<li><a href="table.php?id=<?php echo "Brother" ;?>&cd=<?php echo " Toner"; ?>">Brother</a></li>
<li><a href="table.php?id=<?php echo "Canon" ;?>&cd=<?php echo " Toner"; ?>">Canon</a></li>
<li><a href="table.php?id=<?php echo "Dell" ;?>&cd=<?php echo " Toner"; ?>">Dell</a></li>
<li><a href="table.php?id=<?php echo "Epson" ;?>&cd=<?php echo " Toner"; ?>">Epson</a></li>
<li><a href="table.php?id=<?php echo "HP" ;?>&cd=<?php echo " Toner"; ?>">HP</a></li>
<li><a href="table.php?id=<?php echo "IBM/Lenovo" ;?>&cd=<?php echo " Toner"; ?>">IBM/Lenovo</a></li>

<li><a href="table.php?id=<?php echo "Kyocera/Mita" ;?>&cd=<?php echo " Toner"; ?>">Kyocera/Mita</a></li>
<li><a href="table.php?id=<?php echo "Konica-Minolta/Minolta QMS " ;?>&cd=<?php echo " Toner"; ?>"> Konica-Minolta/Minolta QMS </a></li>
<li><a href="table.php?id=<?php echo "Konica" ;?>&cd=<?php echo " Toner"; ?>">Konica</a></li>

<li><a href="table.php?id=<?php echo "Lexmark" ;?>&cd=<?php echo " Toner"; ?>">Lexmark</a></li>
<li><a href="table.php?id=<?php echo "Minolta" ;?>&cd=<?php echo " Toner"; ?>">Minolta</a></li>
<li><a href="table.php?id=<?php echo "Okidata" ;?>&cd=<?php echo " Toner"; ?>">Okidata</a></li>
<li><a href="table.php?id=<?php echo "Ricoh" ;?>&cd=<?php echo " Toner"; ?>">Ricoh</a></li>
<li><a href="table.php?id=<?php echo "Samsung" ;?>&cd=<?php echo " Toner"; ?>">Samsung</a></li>

<li><a href="table.php?id=<?php echo "TallyGenicom" ;?>&cd=<?php echo " Toner"; ?>">Tally Genicom</a></li>
<li><a href="table.php?id=<?php echo "Tektronix" ;?>&cd=<?php echo " Toner"; ?>">Tektronix</a></li>
<li><a href="table.php?id=<?php echo "Toshiba" ;?>&cd=<?php echo " Toner"; ?>">Toshiba</a></li>
<li><a href="table.php?id=<?php echo "Unisys" ;?>&cd=<?php echo " Toner"; ?>">Unisys</a></li>
<li><a href="table.php?id=<?php echo "Xerox" ;?>&cd=<?php echo " Toner"; ?>">Xerox</a></li>
<li><a href="table.php?id=<?php echo "Xero Ink Sticks" ;?>&cd=<?php echo " Toner"; ?>">Xerox Ink Sticks</a></li>
<li><a href="table.php?id=<?php echo "Gestetner" ;?>&cd=<?php echo " Toner"; ?>">Gestetner</a></li>
<li><a href="table.php?id=<?php echo "Lanier" ;?>&cd=<?php echo " Toner"; ?>">Lanier</a></li>
<li><a href="table.php?id=<?php echo "TROY" ;?>&cd=<?php echo " Toner"; ?>">TROY</a></li>
<li><a href="table.php?id=<?php echo "Lexmark/Troy" ;?>&cd=<?php echo " Toner"; ?>">Lexmark/Troy</a></li>
<li><a href="table.php?id=<?php echo "Okidata" ;?>&cd=<?php echo " Toner"; ?>">Okidata</a></li>
<li><a href="table.php?id=<?php echo "Sharp" ;?>&cd=<?php echo " Toner"; ?>">Sharp</a></li>
<li><a href="table.php?id=<?php echo "Piteny Bowes /Imagistics" ;?>&cd=<?php echo " Toner"; ?>">Piteny Bowes /Imagistics</a></li>
<li><a href="table.php?id=<?php echo "Panasonic" ;?>&cd=<?php echo " Toner"; ?>">Panasonic</a></li>
<li><a href="table.php?id=<?php echo "Savin" ;?>&cd=<?php echo " Toner"; ?>">Savin</a></li>
<li><a href="table.php?id=<?php echo "HP/ Troy" ;?>&cd=<?php echo " Toner"; ?>">HP/ Troy</a></li>
<li><a href="table.php?id=<?php echo "Source Technologies" ;?>&cd=<?php echo " Toner"; ?>">Source Technologies</a></li>

<li><a href="table.php?id=<?php echo "Ricoh/SindoRicoh" ;?>&cd=<?php echo " Toner"; ?>">Ricoh/SindoRicoh</a></li>
<li><a href="table.php?id=<?php echo "Royal Copystar/Copystar" ;?>&cd=<?php echo " Toner"; ?>"> Royal Copystar/Copystar</a></li>
<li><a href="table.php?id=<?php echo "Source Technologies" ;?>&cd=<?php echo " Toner"; ?>"> Standard Register</a></li>


</ul>
</div>
<div class="boxright right">
<?php

include("connection.php");

session_start();

$_SESSION['brand']=$_POST['brand'];
$_SESSION['type']=$_POST['type'];
$_SESSION['sort']=$_POST['sort'];

if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };
$start_from = ($page-1) * 23;


$select="select * from $chun where  brand = '$_SESSION[brand]'  or sort='$_SESSION[sort]' or type ='$_SESSION[type]'  LIMIT $start_from, 18";


$result2=mysql_query($select, $connection) or die (mysql_error());



?>
<h1 >Inkjet and Toner Cartridges for the printing device </h1>
<p class="writeword">PTi is a leading Remanufacturer and distributor of compatible cartridges and orginal product. We also offer the most comprehensive selection of remanufactured ink cartridges for HP printers at low prices. Along with our 100% Quality Guaranteed HP toner cartridges, we also offer high quality compatible inkjet cartridges for many printers at highly competitive prices. All our products are proudly manufactured in the U.S.A.

Enter your search criteria at the top of the page to view details on a specific cartridge. For our award winning customer service, call (780) 4523801 </p>
<table class="tableinsert">
<tr>

<th>Pti Item#</th>
<th>OEM Part#</th>
<th>Machine Compatibilty</th>
<th>Color</th>
<th>Dealer price</th>
<th>OEM Price</th>
</tr>
<?php



while ($row=mysql_fetch_array($result2)) {




?>
<tr>

<td><?php echo $row['item'];?></td>
<td><a href="ddl.php?wd=<?php echo $row['id'] ;?>"><?php echo $row['oempart'];?></a></td>
<td><?php echo $row['compatibility'];?></td>
<td><?php echo $row['colorful'];?></td>


<td>$<?php echo $row['comprice']; ?></td>
<td><?php echo $row['oemprice']; ?></td>
</tr>
<?php



};


?>
</table>
<?php
$sql = "select count(*) from $chun  where    brand = '$_SESSION[brand]' or  type ='$_SESSION[type]' or sort='$_SESSION[sort]'  ";

$rs_result = mysql_query($sql,$connection);
$row = mysql_fetch_row($rs_result);
$total_records = $row[0];
$total_pages = ceil($total_records / 23);

for ($i=1; $i<=$total_pages; $i++) {



?>


<div class="trunpage"><a href='table2.php?page=<?php echo  "$i" ; ?>&id=<?php echo $_SESSION['brand'];?>&cd=<?php echo $_SESSION['type'];?>&td=<?php echo $_SESSION['sort'];?>'  ><?php echo  "$i" ; ?></a>
     
        </div>



<?php
}
?>


</div>
<div class="lineone"></div>

<div class="footer">
<p>Copyright 2007-2010 www.ptiimaging.ca Inc. Canada All rights reserved.
You can reach us at : By Mail: 17873 106a ave, Unit 101 Edmontn Alberta T5S 1V8 By phone: 1-780-452-3801 By Fax: 1-780-452-3832 By email: ptican@telus.net </p>
</div>

</div>
</body>
</html>

Link to comment
Share on other sites

The part of the program is for the session code.

 

<?php

include("connection.php");

session_start();

$_SESSION['brand']=$_POST['brand'];
$_SESSION['type']=$_POST['type'];
$_SESSION['sort']=$_POST['sort'];

if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };
$start_from = ($page-1) * 23;


$select="select * from $chun where  brand = '$_SESSION[brand]'  or sort='$_SESSION[sort]' or type ='$_SESSION[type]'  LIMIT $start_from, 18";


$result2=mysql_query($select, $connection) or die (mysql_error());



?>
<h1 >Inkjet and Toner Cartridges for the printing device </h1>
<p class="writeword">PTi is a leading Remanufacturer and distributor of compatible cartridges and orginal product. We also offer the most comprehensive selection of remanufactured ink cartridges for HP printers at low prices. Along with our 100% Quality Guaranteed HP toner cartridges, we also offer high quality compatible inkjet cartridges for many printers at highly competitive prices. All our products are proudly manufactured in the U.S.A.

Enter your search criteria at the top of the page to view details on a specific cartridge. For our award winning customer service, call (780) 4523801 </p>
<table class="tableinsert">
<tr>

<th>Pti Item#</th>
<th>OEM Part#</th>
<th>Machine Compatibilty</th>
<th>Color</th>
<th>Dealer price</th>
<th>OEM Price</th>
</tr>
<?php



while ($row=mysql_fetch_array($result2)) {




?>
<tr>

<td><?php echo $row['item'];?></td>
<td><a href="ddl.php?wd=<?php echo $row['id'] ;?>"><?php echo $row['oempart'];?></a></td>
<td><?php echo $row['compatibility'];?></td>
<td><?php echo $row['colorful'];?></td>


<td>$<?php echo $row['comprice']; ?></td>
<td><?php echo $row['oemprice']; ?></td>
</tr>
<?php



};


?>
</table>
<?php
$sql = "select count(*) from $chun  where    brand = '$_SESSION[brand]' or  type ='$_SESSION[type]' or sort='$_SESSION[sort]'  ";

$rs_result = mysql_query($sql,$connection);
$row = mysql_fetch_row($rs_result);
$total_records = $row[0];
$total_pages = ceil($total_records / 23);

for ($i=1; $i<=$total_pages; $i++) {



?>


<div class="trunpage"><a href='table2.php?page=<?php echo  "$i" ; ?>&id=<?php echo $_SESSION['brand'];?>&cd=<?php echo $_SESSION['type'];?>&td=<?php echo $_SESSION['sort'];?>'  ><?php echo  "$i" ; ?></a>
     
        </div>



<?php
}
?>


</div>

Link to comment
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.