SEO 1 Links

  SEO Blog
  SEO Forum

  Active Topics

SEO Forums

  SEO Forum
  SEM Forum

  Link Networks
  Mod Rewrite
  Revenue Networks

  Social Bookmarking



  Link Exchange


Time Now:
Mon May 21, 2018 8:18 am

All times are GMT

Log in





Who is Online

Most users ever online in a day was 2917 on Thu Oct 25, 2007 4:43 pm

Member Websites

Free Sitewide Links
For Top Members

SEO 1 Forums > Webmastering >

Question(s) for PHP Pros

Author Thread
New Member

Joined: 18 Feb 2007
Good Posts: 3

Question(s) for PHP Pros  Reply with quote  

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:

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


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">

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

<h1>Hello World</h1>
<center><em><?php echo("$date") ?></em></center>
HP Coupons Study English in UK

Last edited by kisska on Tue Feb 20, 2007 10:56 pm; edited 1 time in total
Post Sun Feb 18, 2007 1:32 pm
 View user's profile Send private message
Senior Member

Joined: 12 Aug 2005
Good Posts: 811

 Reply with quote  

If you are using PHP to generate some parts of your HTML content, embedded PHP is the way to do it.

You can also have pure PHP files where you'd have your utility procs as well.

Estate Agents Maidenhead | | Letting Agents Maidenhead
Post Mon Feb 19, 2007 9:17 am
 View user's profile Send private message Visit poster's website
Full Member

Joined: 18 Apr 2006
Good Posts: 88
Location: Toronto
 Reply with quote  

I like keeping html code and php code separate as much as possible as you have in your example. That way it's easier to read the html code with your html editing software because it highlights the html part instead of having all the html code written on the fly and then it becomes a scrambled mess in the php file and if you view source. Of course there are times when you need to use php to generate html code.

Make Money Online | Probate Investing | Buy Links | Cheap Web Hosting Directory
Post Thu Feb 22, 2007 9:10 pm
 View user's profile Send private message Visit poster's website
Senior Member

Joined: 01 Mar 2006
Good Posts: 336

 Reply with quote  

Hi kisska,

The way you've done the example is good. I'm not sure if your teaching them to hand code it? I'm guessing you are. Not using dreamweaver etc.

I'd recommend using the free program called "notepad++" it colour codes the particular language your writting in. Very good and helps with error checking on the fly.

Cheap domain registrations - Very cheap domain name prices.
Post Sun Feb 25, 2007 4:31 am
 View user's profile Send private message Visit poster's website
Preferred Member

Joined: 16 Nov 2006
Good Posts: 167
Location: UK
 Reply with quote  

Another good (and free!) program is PHP Designer 2007 - colour codes multiple languages, provides syntax checks and can debug scripts if you've got PHP installed locally.

AeroDesigns |
Post Wed Mar 14, 2007 10:35 pm
 View user's profile Send private message Visit poster's website
New Member

Joined: 30 Sep 2008
Good Posts: 16

 Reply with quote  

PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. It generally runs on a web server, taking PHP code as its input and creating web pages as output.


seitensprungagentur natural energy drink
Post Sat Oct 11, 2008 8:48 am
 View user's profile Send private message

Reply to topic
Jump to:  
Display posts from previous:      

SEO 1 © 2005-2015 - SEO 1 the SEO Forum