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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -