Site Statistics
 
Threads: 3,731
Posts: 16,743
Members: 2,845
Users Online: 12
Newest Member: gwein


Go Back   PC101 > The Internet, Web Design & Networking > Web Design and Development

Web Design and Development Design techniques, conepts, HTML, scripts, software, reviews, sponsors and affiliate programs.

Reply
 
LinkBack Thread Tools Display Modes
Old 05-16-2006, 12:40 AM   #1
Junior Member
 
Jenny18's Avatar
 
Join Date: May 2006
Posts: 11
Rep Power: 0 Jenny18 is on a distinguished road
PHP Includes

Do you all use PHP Includes in your websites?
It really helps in keeping maintenance quick and easy.
Basically you put all your nav and other common components in one or more seperate files and call those files from the main page - meaning you only have one copy of the navgation to edit
Jenny18 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-17-2006, 03:45 PM   #2
Forum Staff
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,055
Rep Power: 6 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
I'm not familar with PHP... I just use plain ol' HTML. I'll have to put it on my list of things to learn! lol

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-21-2006, 10:22 PM   #3
Junior Member
 
Ronald's Avatar
 
Join Date: May 2006
Posts: 15
Rep Power: 0 Ronald is on a distinguished road
Definitely Lyte..
You use includes with the HTML
The includes are just one small tag that you add into the HTML.
Easy
Ronald is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-22-2006, 01:13 AM   #4
Senior Member
 
dr911's Avatar
 
Join Date: Nov 2005
Location: Northern Arizona
Posts: 625
Rep Power: 3 dr911 is on a distinguished road
Hey Ronald ,
Would you care to explain (put some code) , so others can benefit. I myself, am an experienced "web-designer" , but thought others could benefit from the more experienced people. (Right Lyte) ??

Thanks,
__________________
May Your Wishes Come True !!

DR911

Goverment Grant & Loan Infomation


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dr911 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-22-2006, 01:24 PM   #5
Senior Member
 
OulZac's Avatar
 
Join Date: Apr 2006
Location: Wilbur
Posts: 346
Rep Power: 3 OulZac is on a distinguished road
a simple php include in html would look like this

PHP Code:
<html>
<head>
</head>
<body>
<?php include 'header.php'?>
-- your main body of the page in html here---
<?php include 'footer.php'?>
</body>
</html>
or you can even use the require_once or require comand as well
PHP Code:
<?php require_once 'file.php'?>
other than doing it for headers or footers, you can use it for menus, sidebars, or just about anything, there are some nice php snippets that people who dont know php can use to make there design easeir, here are some more of the common ones:

Time and Date:
PHP Code:
// Prints something like: Monday 15th of August 2005 03:12:46 PM
echo date('l dS \of F Y h:i:s A');

// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " date("l"mktime(000712000));

/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);

// prints something like: 2000-07-01T00:00:00+00:00
echo date(DATE_ATOMmktime(000712000));

// prints something like: Wednesday the 15th
echo date("l \\t\h\e jS"); 
find info about your php install on your server:
PHP Code:
<?
phpinfo
();
?>
Sending An E-mail, this is a very baisc mail, but if anyone wants, I can post some other more secure, php functions, with variables.
PHP Code:
$to "php@email.com";
$subject "PHP Is Great";
$body "PHP is one of the best scripting languages around";
$headers "From: webmaster@email.com\n";
mail($to,$subject,$body,$headers);
echo 
"Mail sent to $to"
Show a visitors or users info on a page:
PHP Code:
// show users IP, there are a couple ways depending on your version/setup of php 
// number 1
<?php echo $REMOTE_ADDR?>
// number 2
<? echo getenv('REMOTE_ADDR'); ?>
// number 3
<?php echo $HTTP_SERVER_VARS['REMOTE_ADDR'];?>

// show browser
<? echo $_SERVER['HTTP_USER_AGENT']; ?>

I have many more, if anyone wants, I can put up some tutorials on easy to use and make php scripts, like stat counters, mail forms, and what not.
__________________
In the beginning, the Universe was created. This made a lot of people angry, and has been widely regarded as a bad idea.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Showing people there IP for no apparent reason!
OulZac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-22-2006, 02:12 PM   #6
Forum Staff
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,055
Rep Power: 6 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Quote:
Originally Posted by dr911
but thought others could benefit from the more experienced people. (Right Lyte) ??
Too true! It sure beats pulling out a book and flippin' pages. Why does learning online seem faster and easier?! Is it just me?! :p

Quote:
Originally Posted by oulzac
I have many more, if anyone wants, I can put up some tutorials on easy to use and make php scripts, like stat counters, mail forms, and what not.
That would be great! If you wanted, you could start a seperate "tutorial" thread which could be stuck to the top of the Web Design Forum!

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-22-2006, 02:39 PM   #7
Senior Member
 
OulZac's Avatar
 
Join Date: Apr 2006
Location: Wilbur
Posts: 346
Rep Power: 3 OulZac is on a distinguished road
Quote:
Originally Posted by Lyte
It sure beats pulling out a book and flippin' pages. Why does learning online seem faster and easier?! Is it just me?! :p
No its not just you , its always easier with interaction, having someone who can explain and show you in a way other than the defualt text book way.
Most books I have read dont always show you good examples, and you don't get the troubleshooting help with a book like you do online.

Quote:
Originally Posted by Lyte
That would be great! If you wanted, you could start a seperate "tutorial" thread which could be stuck to the top of the Web Design Forum!

Lyte
Okay, I'll do that
Ill start that tonight when I get home
__________________
In the beginning, the Universe was created. This made a lot of people angry, and has been widely regarded as a bad idea.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Showing people there IP for no apparent reason!
OulZac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-22-2006, 07:33 PM   #8
Forum Staff
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,055
Rep Power: 6 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
oulzac,

That is so true! Online, you get almost instant feedback on your work/efforts and typically, feedback from multiple sources!

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Php DalipJ UNIX / Linux 4 08-26-2006 03:53 PM
Install PHP, Apache & MySQL parag2006 Software Development 4 06-20-2006 10:23 AM
PHP & ASP - Advantage, disAdvan, to compare difference.. nvthanhbc Software Development 1 05-08-2006 11:35 AM
Help....trouble with PHP sakshi2212 Web Design and Development 1 03-18-2006 04:22 AM
Internet programming languages other than PHP? cmpolis Software Development 10 01-02-2006 06:08 AM



Flex Development


Our partners:



All times are GMT -5. The time now is 03:11 PM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Design by vBSkinworks

Copyright © PC101 and PC101.com Computer Forum. All rights reserved.