Can you use php and javascript in the same page?

  • Thread starter Thread starter questionman
  • Start date Start date
Q

questionman

Guest
e.g. you have a javascript code to write your navigation buttons but if javascript is disabled <noscript>php version of the code</noscript> or have some javascript codes and php codes. Is it safe?
Can you use PHP in a normal html file?
how do i include a php file in a html document? can it be done?
 
It is absolutely fine to use both, javascript is client side (runs in the users browser) and php is server side (runs 'on the website').

A good website will make use of both client side and server side scripting for different purposes
 
Back
Top