Php

Notice: Undefined index: Pickup1areaId in C:\wamp\www\SRC\bookingdetails.php on line 80

Notice: Undefined index: Pickup2areaId in C:\wamp\www\SRC\bookingdetails.php on line 81

Notice: Undefined index: Droppoint1areaId in C:\wamp\www\SRC\bookingdetails.php on line 82

Notice: Undefined index: Droppoint2areaId in C:\wamp\www\SRC\bookingdetails.php on line 83

Notice: Undefined offset: 3 in C:\wamp\www\SRC\HelperFiles\Helper.class.php on line 126

Notice: Undefined offset: 3 in C:\wamp\www\SRC\HelperFiles\Helper.class.php on line 126

Notice: Undefined offset: 3 in C:\wamp\www\SRC\HelperFiles\Helper.class.php on line 126

please help me to avoid this notice

you can supress that variable with ‘@’ like this;;;
@Pickup1areaId // where you are using this Id…
like this you can do for other variables you created…

Give detailed explanation about your problem…
like coding, exact line of code…

$Pickup1areaId=$_GET[‘Pickup1areaId’];

it’s my code…i got notice in my index value wat wil i do tell me… i cant use @ symbol

It means that you are not sending the variables to give the value
$_GET[‘Pickup1areaID’] is NOT being assigned to the simple variable.

Can you post some code?

<?php
session_start(); 
if((isset($_SESSION['UsNaCom']) && ($_SESSION['UsNaCom'] != ""))  && ((isset($_SESSION['PaWaCom'])) && ($_SESSION['PaWaCom'] != ""))) { 
 	########### INCLUDING FILES #########
	
	//Including  Bussiness objects files
	require_once("BO/BookingdetailsBo.class.php");
	require_once("BO/AreaBo.class.php"); 
	require_once("BO/StreetsBo.class.php");
	require_once("BO/CustomersBo.class.php");  
	require_once("BO/CustomerSelectBo.class.php");  
	
	//Including  Bussiness Layer files
	require_once("BL/BookingdetailsBL.class.php");
	require_once("BL/AreaBl.class.php");
	require_once("BL/StreetBl.class.php");
	require_once("BL/CustomersBL.class.php");
	require_once("BL/CustomerSelectBL.class.php");
	//Including  Helper files
	require_once("HelperFiles/Helper.class.php");
	require_once("HelperFiles/constant.php");
	//Including  Smarty files
	require_once("libs/Smarty.class.php");
	
	//varible declaration for getting AreaId
	$Pickup1areaId="";	
	$Pickup2areaId="";
	$Droppoint1areaId="";
	$Droppoint2areaId="";
	$bookingnumber="";
	########### CREATING OBJECTS ##########
	//Creating Smarty objects   
	$smarty = new Smarty();               
	//$smarty->assign('welcomeMessage',' Booking Details'); 
	
	//creating Labels collect objects 
	$objHelp = new HelperClass(BOOKINGDETAILS);
	$smarty->assign('LabelsList',$objHelp->labelsarray);
	$smarty->assign('HiddenList',$objHelp->hiddenarray);
	$smarty->assign('MandatoryList',$objHelp->MandatoryLabelsArray); 
	$HiddenList = $objHelp->hiddenarray; 
	//$dd = $objHelp->MandatoryLabelsArray;	
	//print_r($objHelp->MandatoryLabelsArray);

	//Creating Bussiness & Business Layer objects
	$objAreaBO       =  new AreaBoclass();
	$objAreaBl       =  new AreaBlClass();
	$objStreetBO     =  new StreetsBoclass();
	$objStreetBl     =  new StreetBlClass();
	$objCustomersBO  =  new CustomersBoclass();
	$objCustomersBl  =  new CustomersBLclass();                                                    
	$objBookingdetailsBO =  new BookingdetailsBoclass();
	$objBookingdetailsBl =  new BookingdetailsBlClass();
	
	$objCustomerSelectBO  =  new CustomerSelectBoclass();
	$objCustomerSelectBl  =  new CustomerSelectBLclass();    
	

	//for displaying areaname as dropdown
	$objAreaBO->intAreaId = 0; 
	$objAreaBO->intLocationId = 1 ;
	$result = $objAreaBl->Selectareaname($objAreaBO);
	$smarty->assign('arealist',$result);
	
	//for displaying customername as dropdown
	$objCustomersBO->intCustomerId = 0 ; 
	$result = $objCustomersBl->Selectcustomernamelist($objCustomersBO);
	$smarty->assign('customerlist',$result);
	//for displaying Booking Number 
	$result = $objBookingdetailsBl->Selectcustomernumber($bookingnumber);
	extract($result);
	$result = $intBookingNumber+1;
	$smarty->assign('bookingnumber',$result);
	
	// for system timezone in booking time 
	$time = new TimeZone; 
	$smarty->assign('time',$time->CollectTimeFormat());   
	
	// assigning back to controls
	$Pickup1areaId=$_GET['Pickup1areaId'];
	$Pickup2areaId=$_GET['Pickup2areaId'];  
	$Droppoint1areaId=$_GET['Droppoint1areaId'];
	$Droppoint2areaId =$_GET['Droppoint2areaId'];
	
	$smarty->assign('Pickup1areaId',$Pickup1areaId);
	$smarty->assign('Pickup2areaId',$Pickup2areaId);
	$smarty->assign('Droppoint1areaId',$Droppoint1areaId);
	$smarty->assign('Droppoint2areaId',$Droppoint2areaId);
  
	if($Pickup1areaId ||$Pickup2areaId || $Droppoint1areaId || $Droppoint2areaId )
   {
	 
		if($Pickup1areaId)
		{   
	   //displaying pickuppoint 1st street name
		$var=$objStreetBO->intAreaId=$Pickup1areaId;
		$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('pickup1streetname',$result);          
   
		}
		if($Pickup2areaId)
		{
	   //displaying pickuppoint 2st street name
		$objStreetBO->intAreaId=$Pickup2areaId;
		$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('pickup2streetname',$result);
		}
		if($Droppoint1areaId)
		{ 
	    //displaying DropPoint 1st street name
		$objStreetBO->intAreaId=$Droppoint1areaId;
	   	$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('droppoint1streetname',$result);          
   
		}
		if($Droppoint2areaId)
		{ 
	    //displaying DropPoint 2st street name
		$objStreetBO->intAreaId=$Droppoint2areaId;
	   	$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('droppoint2streetname',$result);          
   
		}
  }
 
   if(isset($_POST['106'])      && ($_POST['106'] != "")) {
    //Assigning posted values to business objects
 	if(isset($_POST['intBookingDetailsId']) && ($_POST['intBookingDetailsId']) ){
	  	$BookingdetailsId = $_POST['intBookingDetailsId'];
		$objBookingdetailsBO->intBookingDetailsId = $BookingdetailsId;
		
	} else {
	 
			$objBookingdetailsBO->intBookingDetailsId = 0;

			} 
			//select a customer details
		 if(isset($_POST['106'])      && ($_POST['106'])) 
		 {
		 $objCustomerSelectBO->intCompanyId = $_SESSION['CompanyId'];
		 $objCustomerSelectBO->intCustomerId = $_POST['106']; 
		 $objCustomerSelectBO->strAddress1 = $_POST['address'];
		 $objCustomerSelectBO->strPhoneNumber = $_POST['phonenumber'];
		 $objCustomerSelectBO->strCity = $_POST['city'];
		 $objCustomerSelectBO->strEMail = $_POST['email'];
		 $objCustomerSelectBl->UpdateCustomer($objCustomerSelectBO);
		 }
	$objBookingdetailsBO->intCompanyId = $_SESSION['CompanyId'];
	$objBookingdetailsBO->intBookingNumber = $_POST['103']; 
	$objBookingdetailsBO->dtBookingDate = $_POST['104']; 
	$objBookingdetailsBO->dtBookingTime = $_POST['105'];   
	$objBookingdetailsBO->intCustomerName= $_POST['106'];   
	$objBookingdetailsBO->dtPickupTime = $_POST['107'];   
	$objBookingdetailsBO->intPickupPoint1 = $_POST['Pickup1areaname'];   
	$objBookingdetailsBO->intPickupPoint1StreetNames = $_POST['109'];   
	$objBookingdetailsBO->intPickupPoint2 = $_POST['Pickup2areaname'];   
	$objBookingdetailsBO->intPickupPoint2StreetNames = $_POST['111'];  
	$objBookingdetailsBO->intDropPoint1 = $_POST['DropPoint1areaname'];
	$objBookingdetailsBO->intDropPoint1StreetNames = $_POST['113'];     
	$objBookingdetailsBO->intDropPoint2 = $_POST['Droppoint2areaname']; 
	$objBookingdetailsBO->intDropPoint2StreetNames = $_POST['115'];                         
//	print_r($objBookingdetailsBO);
	$ADDMoreTag = $_POST['chaddlist'];
	 
	//insert booking number 
	if(	$_POST['intBookingDetailsId'] == 0){ 
	$bookingnumber = $objBookingdetailsBl->insertbookingnumber($objBookingdetailsBO->intBookingNumber);
	}
	//here insert and update will be perform
	$bookingdetails_result = $objBookingdetailsBl->Addeditbookingdetails($objBookingdetailsBO);
	$name="BOOKING";	
		if($bookingdetails_result == 1) {
        if($ADDMoreTag == 1){
          $smarty->assign('Message','Successfully updated!');        
        }else {
          header("Location:bookingList.php");
        }
	
     }
	  
	 }else if(isset($_REQUEST['intBookingDetailsId']) && $_REQUEST['intBookingDetailsId'] != " "){	
     $smarty->assign('Message', 'Existing Booking Details');
     $objBookingdetailsBO->intBookingDetailsId = $_REQUEST['intBookingDetailsId'];
	  
	$HiddenList['ADDMOAR'] = "ADDMOAR";                

	print_r($HiddenList['ADDMOAR']);
    //Brudcramp variable assigining
     $name="EDIT Booking";
     $Selectrow = $objBookingdetailsBl->select($objBookingdetailsBO);
	 //assigning AreaId for Getting Streetname 
	  $Pickup1areaId=$Selectrow['intPickupPoint1'];
	  $Pickup2areaId=$Selectrow['intPickupPoint2'];
	  $Droppoint1areaId=$Selectrow['intDropPoint1'];
	  $Droppoint2areaId=$Selectrow['intDropPoint2'];
	 if($Pickup1areaId){   
	   
		$var=$objStreetBO->intAreaId=$Pickup1areaId;
		$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('pickup1streetname',$result);          
   	 }
	  if($Pickup2areaId){
		$objStreetBO->intAreaId=$Pickup2areaId;
		$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('pickup2streetname',$result);
	  }
	   if($Droppoint1areaId){ 
		$objStreetBO->intAreaId=$Droppoint1areaId;
	   	$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('droppoint1streetname',$result);          
 	 }
		if($Droppoint2areaId){ 
		$objStreetBO->intAreaId=$Droppoint2areaId;
	   	$result = $objStreetBl->Displaystreetdetails($objStreetBO);
		$smarty->assign('droppoint2streetname',$result);          
	 }
//assigning selected values to from		
$customernumber = $Selectrow['intBookingNumber'];
$smarty->assign('bookingnumber',$customernumber);
$smarty->assign('booking',$Selectrow);
}
else {
    $smarty->assign('Message', 'Add New Booking');
	//echo $level;
    //Brudcramp variable assigining
  $name="ADD Booking";
}
$level = $_REQUEST['level']; 
$level=$level+1; 
//echo $level;
$smarty->assign('link',$objbreadcrumb->displaybrudcramp($level,$name));  
$smarty->display('bookingdetails.tpl');
} else{ 
  header("Location:login.php");  
}
 ?>

it’s my code i got notice like this

Notice: Undefined index: Pickup1areaId in C:\wamp\www\SRC\bookingdetails.php on line 80

Notice: Undefined index: Pickup2areaId in C:\wamp\www\SRC\bookingdetails.php on line 81

Notice: Undefined index: Droppoint1areaId in C:\wamp\www\SRC\bookingdetails.php on line 82

Notice: Undefined index: Droppoint2areaId in C:\wamp\www\SRC\bookingdetails.php on line 83