php in <head>

Reply

Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 30
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

php in <head>

 
0
  #1
Jul 17th, 2007
i am a newbie in learning php, and i would like to know if php can be used just as javascript being initialized in the head of an html docment to be called whenever you need it?
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 162
Reputation: Cerberus is an unknown quantity at this point 
Solved Threads: 14
Cerberus Cerberus is offline Offline
Junior Poster

Re: php in <head>

 
0
  #2
Jul 17th, 2007
I don't think you can do that at all with PHP because it need to be processed by the PHP engine (server side).
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 30
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: php in <head>

 
0
  #3
Jul 17th, 2007
so, when i write php, it must be written down in the body, so when loaded it is able to communicate with the server?

so php functions cannot be called when you need them?
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: php in <head>

 
0
  #4
Jul 17th, 2007
PHP is executed on the server, not in the browser. So it doesn't matter where you put it. If you want something executed in the browser you must use JavaScript.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 136
Reputation: dr4g is an unknown quantity at this point 
Solved Threads: 5
dr4g's Avatar
dr4g dr4g is offline Offline
Junior Poster

Re: php in <head>

 
0
  #5
Jul 17th, 2007
You can execute PHP in any part of your HTML page, for example witin the <head>
GardCMS :: Open Source CMS :: Gardcms.org
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 16
Reputation: WhiteLeo is an unknown quantity at this point 
Solved Threads: 2
WhiteLeo's Avatar
WhiteLeo WhiteLeo is offline Offline
Newbie Poster

Re: php in <head>

 
0
  #6
Jul 19th, 2007
You can look up AJAX, which is php functions executed on the fly by javascript.

That's probably what would work for you.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC