Control Panel
Login to Begin to Talk!





Click Here to Register!
Advertisements


  #1  
Old 02-12-2007, 08:33 AM
Galia Galia is offline
Just Registered
 
Join Date: Jan 2007
Posts: 3
Default Question(s) for PHP Pros

I'm taking a PHP + mySQL class at school, and I wanted to ask some regular php coders out there about how you put php into a page.

I know a small amount of php, enough to make just a simple database driven site. Every tutorial that I've learned from just slaps the php in where it needs to be used. An example would be this:
CODE
<?php

$date = date("F d, Y H:i:s a");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>Comm393: </title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>

<h1>Hello World</h1>
<center><em><?php echo("$date") ?></em></center>
</body></html>
_________________
Dell Coupons English course in summer

Last edited by Galia : 02-20-2007 at 01:16 PM.
Reply With Quote
  #2  
Old 02-05-2008, 04:45 AM
stefradu stefradu is offline
Just Registered
 
Join Date: Jan 2008
Posts: 3
Send a message via Yahoo to stefradu
Default

Your code is good. The page should have .php extension instead of.html
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -7. The time now is 06:48 AM.


Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Site Sift Media, Inc.