I do have a PHP script with run fine on my local sever. When i do upload to the production sever it dose not function correctly.
My local sever uses Apache/2.2.22 (Win32) PHP/5.4.5.
Here is an example of the code.
PHP Code:
<?php
    
require_once('lib/bookmark_fns.php');
    
// The shopping cart needs sessions, so start one
    
session_start();
    
    
$itemId $_GET['itemid'];
    
// get this book out of database
    
$items get_item_details($itemId);
    foreach(
$items as $item)
        
do_html_header($item['ITEM_NAME']);
        
check_valid_user();
        
display_item_details($items);
    
        
// set url for "continue button"
        
$target "index.php";
        if(
$itemId
        {
            
$target "show_cat.php?catid=".$item['CATEGORY_ID'];
        }
    
        
// if logged in as admin, show edit book links
        
if(check_admin_user())
        {
            
display_button("edit_item_form.php?itemid=".$itemId"edit-item""Edit Item");
            
display_button("admin.php""admin-menu""Admin Menu");
            
//display_button($target, "continue", "Continue");
        

        else 
        {
            
display_button("show_cart.php?new=".$itemId"add-to-cart""Add ".$item['ITEM_NAME']." To My Shopping Cart");
            
display_button($target"continue-shopping""Continue Shopping");
        }
        
do_html_footer();
?>
Here is the problem, on my local sever I must include the foreach loop to access the array from the Sql query. On the production sever it tells me i do have an wrong foreach construct. Help please.