Welcome Guest, Not a member yet? Register   Sign In
Need help related to my codeigniter wallpaper script
#20

(This post was last modified: 01-16-2018, 04:32 AM by jreklund.)

You are opening a dropdown named 'license_type':
PHP Code:
form_dropdown('license_type',array()); 

And later on you are trying to fetch a 'license' that's supposed to be 'license_type'. Also you need a haystack in your in_array.
in_array validates your post (license_type) and try to match it against a haystack. haystack = all possible options.
http://php.net/manual/en/function.in-array.php
PHP Code:
'license' => in_array($this->input->post('license_type')) ? $this->input->post('license') : '2'

PHP Code:
$haystack = (1,2,3,4,5,6); // Don't hardcode this if you have an array already
'license' => in_array($this->input->post('license_type'),$haystack) ? $this->input->post('license_type') : '2'
Reply


Messages In This Thread
RE: Need help related to my codeigniter wallpaper script - by jreklund - 01-16-2018, 04:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB