Jump to content

m118

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Everything posted by m118

  1. I read the code in the card. I have not found the problem. I think the program is working.
  2. I use this program on the server. It does not work. <?php $pdf= pdf_new(); ?> This is the problem of the program or the problem of the server. http://www.ptiimaging.ca/pdf.php
  3. I set up e-commence system for our company, there is a problem in this project. When I try to add the product in the cart, it can not do the Extended Price over one thousand dollars. If the Extended Price is lower than one thousand dollars, it is working. I do not know how to fix this problem . Please tell me , thank you very much The link is http://www.ptiimaging.ca/po.php?wd=1551 This is the code. <?php include("connection.php"); $sessid=session_id(); $select="select * from carttemp where sess= '$sessid'"; $result2=mysql_query($select, $connection) or die (mysql_error()); $rows=mysql_num_rows($result2); ?> <p align="center"> You currently have <?php echo "$rows "; ?>product(s) in your cart.</p> <br> <div class="tabbanner"><strong>View the Shopping cart </strong></div> <table class="tableinsert"> <tr> <th>Quantity</th> <th>Item Name</th> <th>Price Each</th> <th>Extended Price</th> <th></th> <th></th> <th></th> </tr> <?php while ($row=mysql_fetch_array($result2)) { extract($row); $price; $quan; $extprice=number_format($price*$quan,2); ?> <tr> <td> <form action="change1.php" method="post"> <input type="hidden" name="prodnum" value="<?php echo $row['prodnum']; ?>"/> <input type="hidden" name="sessid" value="<?php echo $row['sess']; ?>" /> <input type="hidden" name="hidden" value="<?php echo $row['hidden']; ?>"/> <input type="text" name="qty" size="5" value="<?php echo $row['quan']; ?>"/> </td> <td><?php echo $row['prodnum']; ?></td> <td><?php echo $row['price']; ?></td> <td><?php echo $extprice ; ?></td> <td> <input type="submit" name="submit" value="change Qty" /> </form> </td> <td> <form action="xid.php" method="post"> <input type="hidden" name="prodnum" value="<?php echo $row['prodnum']; ?>"/> <input type="hidden" name="sessid" value="<?php echo $row['sess']; ?>" /> <input type="hidden" name="hidden" value="<?php echo $row['hidden']; ?>" <input type="hidden" name="qty" size="2" value="<?php echo $row['quan']; ?>" /> <input type="submit" value="Delete Item" name="submit" /> </form> </td> </tr> <?php $total=$extprice+$total; }; ?>
  4. My company is going to set up e-commence system on the web . I have finish a part of the program. This is my company's web site. www.ptiimaging.ca .So far, I do not know too much about this system. Please give me some clue about how to use it or clue of the other e-commence template. Thank you very much.
  5. My company wants to sell the product on line. I use PHP to write Program. Please tell me the template name.
  6. 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>
  7. <!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>
  8. The program can only work on one web page. It can not trun the page.
  9. I try to find the problem for a long time. I have not found the problem. Thank you very much.
  10. 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>
  11. Thank you very much. The data has write space there. I fix the problem.
  12. there is no error post. The data does not display part of the data. I think I have some space in the data . I will try . Thank you very much.
  13. I am sorry I am just a beginner. <li><a href="table.php?id=<?php echo "Apple" ;?>&cd=<?php echo " Toner"; ?>">Apple</a></li> $select="select * from $chun where brand = '$_GET[id]'and kind ='$_GET[cd]' LIMIT $start_from, 20";
  14. The program is working for part of the data . It can display in the CSS and HTML code, however, the other data can not display . I do not why . They are same structure . Please tell me the reason. Thank you very much.
  15. Who can give any idea ? Thank you very much.
  16. hello I think the session code is working, because I can see this link on the browser. http://localhost/php1000/table2.php?page=2&id=HP&cd=Copier&td=MICR Toner
  17. The code can work on the first page.
  18. hello The code can work on one page. when I try to turn the page to the next page, I get error message. Notice: Undefined index: brand in C:\wamp\www\php1000\table2.php on line 179 Notice: Undefined index: type in C:\wamp\www\php1000\table2.php on line 180 Notice: Undefined index: sort in C:\wamp\www\php1000\table2.php on line 181
  19. In order to keep data on the browser , so I use session to keep post data. I try to turn the page. I does not work , I do not know how to fix it. Please tell me . Thank you very much. session_start(); $_SESSION['brand']=$_POST['brand']; $_SESSION['type']=$_POST['type']; $_SESSION['sort']=$_POST['sort']; include("connection.php"); if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; $start_from = ($page-1) * 18; $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()); <?php while ($row=mysql_fetch_array($result2)) { ?> <tr> <td><?php echo $row['item'];?></td> <td><?php echo $row['oempart'];?></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 / 18); 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 } ?>
  20. hello I have fix program now. I got a new problem . You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Toner or type=Copier LIMIT 0, 18' at line 1 The whole program is it. <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> include("connection.php"); session_start(); $c=$_SESSION['brand']=$_POST['brand']; $xi=$_SESSION['sort']=$_POST['sort']; $zhang=$_SESSION['type']=$_POST['type']; if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; $start_from = ($page-1) * 18; $select="select * from $chun where brand = $c or sort =$xi or type=$zhang LIMIT $start_from, 18"; $result2=mysql_query($select, $connection) or die (mysql_error()); <tr> <td><?php echo $row['item'];?></td> <td><?php echo $row['oempart'];?></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 = $c or sort =$xi or type=$zhang "; $rs_result = mysql_query($sql,$connection); $row = mysql_fetch_row($rs_result); $total_records = $row[0]; $total_pages = ceil($total_records / 18); for ($i=1; $i<=$total_pages; $i++) { ?> <div class="trunpage"><a href='table2.php?page=<?php echo "$i" ; ?>&id=<?php echo "$c";?>&cd=<?php echo "$xi";?>&td=<?php echo "$zhang";?>' ><?php echo "$i" ; ?></a> </div>
  21. I change the program. It is not working . <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> session_start(); $_SESSION['brand']=$_POST['brand']; $_SESSION['sort']=$_POST['sort']; $_SESSION['type']=$_POST['type']; if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; $start_from = ($page-1) * 18; $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()); $sql = "select count(*) from $chun where brand = "$_SESSION['brand']" or sort ="$_SESSION['sort']" or type="$_SESSION['type']" "; $rs_result = mysql_query($sql,$connection); $row = mysql_fetch_row($rs_result); $total_records = $row[0]; $total_pages = ceil($total_records / 18); 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['sort']";?>&td=<?php echo "$_SESSION['type']";?>' ><?php echo "$i" ; ?></a>
  22. I am just a beginner, but I do whole project. Thank you very much.
  23. I try to use session to keep post data. It is not working. The program likes this . html <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 /> PHP CODE $session_start(); $_SESSION[brand]=$_POST[brand]; $_SESSION[sort]=$_POST[sort]; $_SESSION[type]=$_POST[type]; if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; $start_from = ($page-1) * 18; $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()); $sql = "select count(*) from $chun where brand = '$_SESSION[brand]' or sort ='$_SESSION[sort]' or type='$_SESSION[type]' "; <div class="trunpage"><a href='table2.php?page=<?php echo "$i" ; ?>&id=<?php echo "$_POST[brand]";?>&cd=<?php echo "$_POST[kind]";?>&td=<?php echo "$_POST[type]";?>' ><?php echo "$i" ; ?></a> I get error message. Notice: Undefined variable: session_start in C:\wamp\www\php1000\table2.php on line 174 Fatal error: Function name must be a string in C:\wamp\www\php1000\table2.php on line 174 Please tell me how to solve this problem . Thank you very much.
×
×
  • 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.