#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    1
    Rep Power
    0

    How to fix error : Notice: Use of undefined


    Hello
    How to fix error : Notice: Use of undefined when install shop ?
    please help , thank you



    Notice: Undefined index: page in C:\xampp\htdocs\topftax\library\fiprotect.php on line 27

    Notice: Use of undefined constant AFFID - assumed 'AFFID' in C:\xampp\htdocs\topftax\include\global.php on line 18

    Notice: Use of undefined constant page - assumed 'page' in C:\xampp\htdocs\topftax\include\global.php on line 22

    Notice: Use of undefined constant page - assumed 'page' in C:\xampp\htdocs\topftax\include\global.php on line 25

    Notice: Undefined index: page in C:\xampp\htdocs\topftax\include\global.php on line 25

    Notice: Use of undefined constant detail - assumed 'detail' in C:\xampp\htdocs\topftax\include\global.php on line 25

    Notice: Use of undefined constant page - assumed 'page' in C:\xampp\htdocs\topftax\include\global.php on line 28

    Notice: Undefined index: page in C:\xampp\htdocs\topftax\include\global.php on line 28

    Notice: Use of undefined constant browse - assumed 'browse' in C:\xampp\htdocs\topftax\include\global.php on line 28

    Notice: Undefined variable: aff in C:\xampp\htdocs\topftax\include\global.php on line 39

    Notice: Undefined variable: aff in C:\xampp\htdocs\topftax\include\global.php on line 40

    Notice: Use of undefined constant page - assumed 'page' in C:\xampp\htdocs\topftax\include\global.php on line 42

    Notice: Use of undefined constant page - assumed 'page' in C:\xampp\htdocs\topftax\include\global.php on line 42

    Notice: Undefined index: page in C:\xampp\htdocs\topftax\include\global.php on line 42

    Notice: Use of undefined constant PHOTOSIZE - assumed 'PHOTOSIZE' in C:\xampp\htdocs\topftax\include\global.php on line 46

    Notice: Use of undefined constant PHOTOSIZE - assumed 'PHOTOSIZE' in C:\xampp\htdocs\topftax\include\global.php on line 46

    Notice: Use of undefined constant THUMBSIZE - assumed 'THUMBSIZE' in C:\xampp\htdocs\topftax\include\global.php on line 47

    Notice: Use of undefined constant THUMBSIZE - assumed 'THUMBSIZE' in C:\xampp\htdocs\topftax\include\global.php on line 47

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 51

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 51

    Notice: Use of undefined constant USD - assumed 'USD' in C:\xampp\htdocs\topftax\include\global.php on line 51

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 52

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 52

    Notice: Use of undefined constant CAD - assumed 'CAD' in C:\xampp\htdocs\topftax\include\global.php on line 52

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 53

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 53

    Notice: Use of undefined constant EUR - assumed 'EUR' in C:\xampp\htdocs\topftax\include\global.php on line 53

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 54

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 54

    Notice: Use of undefined constant GBP - assumed 'GBP' in C:\xampp\htdocs\topftax\include\global.php on line 54

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 55

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 55

    Notice: Use of undefined constant JYN - assumed 'JYN' in C:\xampp\htdocs\topftax\include\global.php on line 55

    Notice: Use of undefined constant CURRENCY - assumed 'CURRENCY' in C:\xampp\htdocs\topftax\include\global.php on line 56

    Notice: Undefined index: CURRENCY in C:\xampp\htdocs\topftax\include\global.php on line 56

    Notice: Use of undefined constant AUD - assumed 'AUD' in C:\xampp\htdocs\topftax\include\global.php on line 56

    <?php

    if(stristr($_SERVER['SERVER_SOFTWARE'],'microsoft'))
    error_reporting("E_ALL");

    //----------------------------------------------------------------------------------

    $script_title = "idev-DigiShop";
    $version = "2.0";
    @$SQLxxx = "SELECT * from SETTINGS"; $resultxxx = @mysql_query( $SQLxxx ); $rowxxx = @mysql_fetch_array( $resultxxx );

    //----------------------------------------------------------------------------------

    $currentFile = $_SERVER["PHP_SELF"];
    $parts = Explode('/', $currentFile);
    $page = $parts[count($parts) - 1];

    if ($rowxxx[AFFID] != '') $aff = "?xyz=$rowxxx[AFFID]";

    $by = "Shopping Cart for Downloads";

    if (empty($_GET[page]) || $_GET[page] == home)
    $by = "Shopping Cart for Downloads";

    if ($_GET[page] == detail)
    $by = "Digital Download Store";

    if ($_GET[page] == browse)
    $by = "Sell Downloads";

    if ($page == "download.php")
    $by = "Shopping Cart for Downloads";

    if ($page == "order.php")
    $by = "Sell Downloads";

    $link = "";
    $poweredbylink =
    "(<a href=$link$aff>$by</a> ::
    <a href=$link$aff>$script_title</a>" . " $version" . ")";

    $_GET[page] = $_GET[page];

    //----------------------------------------------------------------------------------

    if (empty($rowxxx[PHOTOSIZE])) $rowxxx[PHOTOSIZE] = 550;
    if (empty($rowxxx[THUMBSIZE])) $rowxxx[THUMBSIZE] = 115;

    //----------------------------------------------------------------------------------

    if ($rowxxx[CURRENCY] == USD) {$cname = 'US Dollars'; $csymbol = '$';}
    if ($rowxxx[CURRENCY] == CAD) {$cname = 'Canadia Dollars'; $csymbol = '$';}
    if ($rowxxx[CURRENCY] == EUR) {$cname = 'Euros'; $csymbol = '';}
    if ($rowxxx[CURRENCY] == GBP) {$cname = 'Pounds Sterling'; $csymbol = '';}
    if ($rowxxx[CURRENCY] == JYN) {$cname = 'Yen'; $csymbol = '';}
    if ($rowxxx[CURRENCY] == AUD) {$cname = 'Australian'; $csymbol = '$';}

    //----------------------------------------------------------------------------------

    ?>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,230
    Rep Power
    593
    First, please enclose your code in [ PHP ] tags. See the sticky at the top of this forum.

    Second, do not use the deprecated MySQL extensions. Switch to PDO.

    Third, since I do not see anywhere that those constants are defined, the error is exactly what I would expect.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,689
    Rep Power
    6351
    This error means you're trying to access an array element which does not exist. It's a very common error especially in quick-and-dirty sloppy code like this. You probably didn't see it before because you had errors turned off.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo