I am attempting to hide a div when a specific value is posted. I want to be able to echo the additional css in the style=”” of a div. I get the following error when I do so:
Fatal error: Function name must be a string in /home/bryantrx/public_html/wo/or/wo_add.php on line 185
Here is my code from line 185:
<div <?php if (!$_POST('JobTypeDDL') == "New Mobility"){echo "style='display:none;'";}?>>test</div>
If there is an alternative way of doing this please let me know.
$_POSTis an associative array super global, not a function.Wrong:
Right:
Note: I encourage you to read through the PHP types.