"Urgent" always makes me want delay answering questions....
If you mean "Can I use javascript to set a javascript variable to 1 and use that output in a php script without submitting the information to the server" then the answer is no obviously.
PHP runs on the server, javascript runs on the client. So PHP is run BEFORE the javascript. if you want to use the javascript ouput in PHP, you must submit.