Jump to content

Undefined index


hass1980

Recommended Posts

Hi im getting this error on my web page:

 

Notice: Undefined index: id in C:\wamp\www\chapter25\show_cat.php on line 6

 

 

 

<?php
  include ('book_sc_fns.php');
  // The shopping cart needs sessions, so start one
  session_start();

  $catid = $_GET['id'];
  $name = get_category_name($catid);

  do_html_header($name);

  // get the book info out from db
  $book_array = get_books($catid);

  display_books($book_array);


  // if logged in as admin, show add, delete book links
  if(isset($HTTP_SESSION_VARS['admin_user']))
  {
    display_button('index.php', 'continue', 'Continue Shopping');
    display_button('admin.php', 'admin-menu', 'Admin Menu');
    display_button("edit_category_form.php?catid=$catid", 
     'edit-category', 'Edit Category');
  }
  else
    display_button('index.php', 'continue-shopping', 'Continue Shopping');
  
  do_html_footer();
?>



Link to comment
https://forums.phpfreaks.com/topic/154400-undefined-index/
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.