Welcome Guest, Not a member yet? Register   Sign In
Better than if(count($_POST) > 0)
#11

[eluser]veledrom[/eluser]
So which one do you prefer guys? Best practise, most reliable and fastest.


Code:
<input type="submit" name="submit_button" value="Login"  />

Code:
if($this->input->post('submit_button') == 'Login') {
// do something
}

if(! empty($_POST)) {
// do something
}

if(count($_POST) > 0)
{
// do something
}

if(! empty($_POST['submit_button']))
{
// do something
}

if(isset($_POST["submit_button"]))
{
// do something
}


Messages In This Thread
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 04:13 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 04:45 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 05:13 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 05:19 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 05:42 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 05:52 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 07:34 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 07:37 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 07:41 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 08:45 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 09:22 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 09:58 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 10:08 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 10:20 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 10:49 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 10:53 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 11:54 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 11:59 AM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 12:07 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 12:22 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 12:54 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 01:47 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 02:20 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 02:23 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 02:34 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 02:46 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 03:05 PM
Better than if(count($_POST) > 0) - by El Forum - 03-02-2012, 09:39 PM
Better than if(count($_POST) > 0) - by El Forum - 03-03-2012, 09:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB