Answer Posted / webguy
Mukesh(watch out for syntax errors) and atanu are right.
VIvek seemed have misunderstood the question. It's more of
injecting JS code within PHP code segment like this:
<?php
echo "<script type='text/javascript'>";
echo "alert('jams bond');";
echo "</script>";
?>
OR
<?php
echo "<script type='text/javascript'>alert('jams
bond');</script>";
?>
| Is This Answer Correct ? | 24 Yes | 8 No |
Post New Answer View All Answers
How can we submit from without a submit button?
What is the difference between for and foreach loop in php?
How to download file in php?
Which Scripting Engine PHP uses?
Which php global variable is used for uploading a file?
What is the difference between exception::getmessage and exception::getline?
Which function parses an English textual date or time into Unix timestamp in PHP.
What is the difference between overloading and overriding in php?
Why php language is used?
Why many companies are switching their current business language to php? Where php basically used?
Which programming language does php resemble?
What is the correct php command to use to catch any error messages within the code?
What is the current stable version of php?
What does csrf token mean?
Which of the delimiter is ASP style?