PHP - Explain with an example how to insert javascript in php code.

Explain with an example how to insert javascript in php code.

JavaScript can be inserted by specifying the language as:-
<?
<script language='javascript'>
Code goes here
</script>
?>

Explain with an example how to insert javascript in php code.

Java script can be inserted by embedding <script> tag in a php script as follows:
1) <?
     <script language='javascript'>
     . . . . . .
     </script>
     ?>

2) <?php
     echo" <script language='javascript'>
     </script>";
     ?>

3) <?php
     echo <script type="text/javascript">
     </script>
     ?>
PHP - Is it possible to send HTML mail with php?
Is it possible to send HTML mail with php? - Yes, using the mail() function of PHP, HTML emails can be sent.....
PHP - Explain how to use PGP with PHP
Explain how to use PGP with PHP - In most cases GnUPG(GNU Privacy Guard) is recommended rather than Pretty Good Privacy...
PHP - Explain how to do user authentication in php.
Explain how to do user authentication in php - The most convenient way to authenticate a user in PHP is to use session.....
Post your comment