I am working on a PHP project and see that <script>...</script>
is used. What is this used for?
I see it in the code like:
else {
echo '<script> userexist(); </script>';
}
Anything printed by PHP is returned to the client. In this case the HTML is inserted into the webpage returned by the server. Script tags in HTML contain javascript. In this case it is inserting a call to the userexist() javascript function in your webpage.