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
What is php and why we use it?
What's the difference between accessing a class method via -> and via ::?
How does php strcmp work?
How do you find the length of a string in php?
How to access a global variable inside a function?
What is the goto statement useful for?
What is a query in php?
Which function is used in php to count the total number of rows returned by any query?
Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?
what are the differences between php and perl
How to include a file code in different files in php?
Do I need to install php after xampp?
How to count a number of words in a string in php?
How to stop the execution of php script?
What is multidimensional array in php?