doutang7383 2014-07-03 15:29
浏览 63

PHP文件中的CodeIgniter错误

I have searched and read but don't really understand the answers posted for the questions of Undefined Index and Undefined Variable. These are the errors I get:

A PHP Error was encountered Severity: Notice Message: Undefined index: claim_number Filename: core/MY_Controller.php Line Number: 161

A PHP Error was encountered Severity: Notice Message: Undefined variable: claim_number Filename: email/review_status_changed.php Line Number: 28

My questions is where do I add the database field claim_number? Right now it uses claim_id and when I change it to claim_number I get the errors above.

Please point me in the right direction.

Thanks for any help in advance.

  • 写回答

1条回答 默认 最新

  • duankua3620 2014-07-03 15:51
    关注

    If you're pulling this data from your database, you'd either want to change the field name to claim_number or rather,

    set a new index $your_var['claim_number'] = $your_var['clain_id']

    Currently, you're trying to access a value that doesn't exist, and from your description of the problem, it seems you're setting that index ($your_var['claim_number']) to a variable ($claim_number) which, when used will also return undefined.

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题