I want to get the image cordinates in PHP on clicking the submit button, when I try the below code getting error for isset -
<?php function imagecheck(){ if(isset($_post(["x"]) && isset($_post(["y"])){ echo "x : ".$_post["x"]."<br />"; echo "y : ".$_post["y"]."<br />"; } else{ echo "click on image<br />"; } } ?> in above code, getting error
"fatal error: cannot use isset() on result of function call (you can use "null !== func()" instead) in c:forms.php"
i beginner in php, kindly
if(isset($_post(["x"]) && isset($_post(["y"])){ ^-----^--- $_post superglobal array. not function.
the code should be
if (isset($_post['x']) && isset($_post['y'])) {
Comments
Post a Comment