Hall of Famer |
11-12-2011 03:01 PM |
For some reason the script wont run while I was betatesting it(not even giving errors, just all blank). I'd rewrite your codes in this way:
PHP Code:
if ($random_1=='1' || $random_2=='1' || $random_3=='1' || $random_4=='1') $v1='1'; else $v1='0';
The brackets in if statement can be tricky. I am assuming you are using a shortcut since you only have one line of codes following if and else, but the best way to handle this is to get rid of the bracket. Once you have brackets in your if statement, you will have to write separate lines like this:
PHP Code:
if ($random_1=='1' || $random_2=='1' || $random_3=='1' || $random_4=='1'){ $v1='1'; } else { $v1='0'; }
Hopefully this solves your problem. I cannot test your script on my site there is no guarantee that I make no mistakes. Also it seems that you are trying to utilize a part of PHP and javascript codes?
|