now i made JavaScript code (jquery code) and when i click ok it return true if i want true and false if i want false
now the problem is php not consider true as php keyword true its just consider it a word like any other word and i must make it like this
if($post == 'true')
and i want make it like this
if($post) // retuen true if $post true
how i can do that
and i use jquery function is() to send true or false to php
Like Raveren said, you can’t send integer, or boolean to PHP. All sent data is string, always. If you still want to use if ($post) and not if ($post == ‘true’) then use switch
no other way to do it