Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: error

  1. #1
    Regular Coder Pearl_9's Avatar
    Join Date
    Aug 2013
    Posts
    501
    Thanks
    19
    Thanked 0 Times in 0 Posts

    error

    PHP Code:
      if(!empty($_POST['images'])){
    $images$_POST['images'];
    }
     
      
    $images $_FILES['images']['name'];
    {
      
    $target 'images/'.basename($images);

     

    Notice: Undefined index: images in C:\xampp\htdocs\h\l\cv\blog-post-dark.php o




    Notice: Undefined index: images in C:\xampp\htdocs\h\l\cv\blog-post-dark.php



    i am getting errors too many like that is any way that can get rid of it.
    Last edited by Pearl_9; Sep 3rd, 2018 at 11:41 AM.

  2. #2
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,314
    Thanks
    7
    Thanked 1,361 Times in 1,330 Posts
    This happens if the variable is called but doesn’t have any value. You need to have an alternative in case no value can be assigned, like:

    Code:
    if(!empty($_POST['images'])){
      $images= $_POST['images'];
    }
    else {
      $images = null;
    }

  3. #3
    Regular Coder Pearl_9's Avatar
    Join Date
    Aug 2013
    Posts
    501
    Thanks
    19
    Thanked 0 Times in 0 Posts
    how add value


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •