PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Fettah Kurtulus   FKBasket Class   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: fkbasketclass test file
Class: FKBasket Class
Manage products in a shopping basket with sessions
Author: By
Last change:
Date: 11 years ago
Size: 939 bytes
 

Contents

Class file image Download
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>fkBasketClass Test</title>

<?php
    session_start
();
    require(
"fkBasket.class.php");
   
   
$basket = new fkBasket();
    if(isset(
$_GET["id"]))
    {
       
$basket->addToBasket($_GET["id"]);
    }
   
print_r($_SESSION["productId"]);
    foreach(
$_SESSION["productId"] as $id)
    {
        echo
$id." - ";
    }
    echo
$basket->totalProductinBasket()." Adet Ürün Var Sepetinizde";
?>
<link href="agroStyle.css" rel="stylesheet" type="text/css" />
</head>

<body>

    <div id="content">
      <form id="fk" name="fk" method="get" action="basketTest.php">
          <input name="id" id="id" type="text" />
          <input type="submit" value="send" />
      </form>
    </div>
</body>
</html>