-1

I am using a php mysql based crm software which is made using Codeigniter. I don't have any knowledge about Codeigniter. I just customized it as per my requirements.

Whenever I am trying to save any data I am getting this error.

enter image description here While using in Xampp I did not get these errors. When I put it online I started to get these. Also I tried to ignore PHP errors, warnings using

error_reporting(0); in my controller/admin.php

This would just hide the errors and not ignore them and proceed to the redirected page after the save.

If anything else is needed please let me know.

pagid
  • 13,559
  • 11
  • 78
  • 104
user1299086
  • 91
  • 1
  • 7
  • @castis : I did but frankly they were ignored when working offline and I just wanted the same here. The data does get saved but then the page doesnt redirects and gets stuck in the error page. – user1299086 Apr 15 '15 at 18:35
  • @castis : Thanks for the advise . Fixed one error and the rest all are gone :) – user1299086 Apr 15 '15 at 18:50
  • This is not related to MySQL - people with MySQL skills won't be able to help. Therefore I removed the tag. – pagid Apr 15 '15 at 19:21
  • possible duplicate of [PHP: "Notice: Undefined variable" and "Notice: Undefined index"](http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index) – andrewsi Apr 16 '15 at 00:46

1 Answers1

3

Undefined index -- that's the error you need to resolve here. You're most likely trying to access a property of $_GET or $_POST using an incorrect key name.

For the sake of debugging, try this:

if(isset($_GET['keyname'])) {
  $myObj->prop = $_GET['keyname'];
} else {
  show_error('No value set for keyname', 500);
}

I'm making a lot of assumptions about your code here, replace keyname with whatever you are trying to access.

For reference, you should probably switch to using the CodeIgniter Input Class to get values from GET/POST.

luciddreamz
  • 2,073
  • 14
  • 15