Welcome Guest, Not a member yet? Register   Sign In
Undefined index: submit_form in C:\wamp\www\cms\private\youreditor.php on line 23
#2

[eluser]TheFuzzy0ne[/eluser]
You're being very naughty and not checking that the post variable is set (isset()).
Code:
if (isset($_POST['submit_form']) && $_POST['submit_form'] == 1) {

The input class fixes this for you, but your code doesn't look like it's compatible with CodeIgniter...

If you need to use isset() lots of times throughout your code, you can export it to a function like this:
Code:
function get_post($index)
{
    return isset($_POST[$index]) ? $_POST[$index] : FALSE;
}
The above code is untested

And then you can use it like this:
Code:
if (get_post('submit_form') == 1) {


Messages In This Thread
Undefined index: submit_form in C:\wamp\www\cms\private\youreditor.php on line 23 - by El Forum - 02-19-2009, 08:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB