Write php inside javascript alert
4 answers
Your string will be
alert(Error-login); As you can see, you are missing quotation marks:
alert('Error-login'); If someone uses quotation marks in the translation, this will also result in an error:
alert('Error are here'); Thus, you need to avoid single quotes before passing them to Javascript.
+2