I have the follow code:
onclick=" <?php echo 'postwith(\''.$_SERVER['PHP_SELF'].'\',{export:\'export\',date:\''.$_POST['date'].'\'})'; ?>"
while postwith is a function.
in ie i have an error:
Expected identifier, string or number
in firefox it’s ok and the link is:
postwith('/page/page.php',{export:'export',date:'Yesterday'})
so where is my mistake?
thank you!
As warrenm pointed out
exportis a keyword and needs to be quoted.That is, alter the PHP so the result output is:
Your PHP would look like this:
(Thanks, Peter for the improved syntax).
Also, you may wish to remove the space after onclick:
will become: