Webmastersite.net
Register Log In

Notices undefined indexes in suggest.php

Title Notices undefined indexes in suggest.php
Description solution included
Message Text The suggest.php page generates notices about undefined array indexes in the PHP error log. PHP Notice: Undefined index: catid in suggest.php on line 2 PHP Notice: Undefined index: backupcatid in suggest.php on line 2 This can be solved by replacing the following code: if (!$_POST['catid']) { $_POST['catid'] = $_POST['backupcatid']; $_REQUEST['catid'] = $_REQUEST['backupcatid']; } // evade illogical error of missing catid with this code: // evade illogical error of missing catid if ( !isset( $_POST['catid'] ) ) { if ( isset( $_POST['backupcatid'] ) ) $_POST['catid'] = $_POST['backupcatid']; if ( isset( $_REQUEST['backupcatid'] ) ) $_REQUEST['catid'] = $_REQUEST['backupcatid']; } In general the code in this page looks rather messy wink
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership thechronic
Views 614 views. Averaging 0 views per day.
Similar Topics
Submission Date Mar 16, 2006 - 4:37 AM