Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Site. Please Help
Old 08-14-2004, 12:13 PM PHP Site. Please Help
webspace's Avatar
Super Spam Talker

Posts: 929
Name: Buck Roberts
Location: Astoria, Oregon, United States
Trades: 0
I want to create a PHP site I have been making large sites 300 pages in HTML.

These are all informational sites the articles don't need to be changed, I would, however like to update the text link advertisments without editing every page. It gets old.
I have edited some PHP, but I don't understand much of it just enough to add advertisments to a site that is written in PHP.

I don't know how to set it up on the server.

What I need: A way to make my navigation links change for all my pages with only one edit in a main file.

It has to in a way that will not screw up my search engine rankings.

Advice?

Offers?
webspace is offline
Reply With Quote
View Public Profile Visit webspace's homepage!
 
 
Register now for full access!
Old 08-14-2004, 02:48 PM
Average Talker

Posts: 16
Trades: 0
put your nav coding in a file named nav.php; then in your other files put

PHP Code:
include ('nav.php'); 
at the point where you want the nav displayed
litebearer is offline
Reply With Quote
View Public Profile
 
Old 08-14-2004, 03:06 PM
Unknown.

Posts: 1,693
Trades: 0
To Simplify that...

PHP Code:
<?php include 'navpage.htm'?>
You could then add this into every html file and just change the extension to .php

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 08-14-2004, 05:15 PM I need to start at step one
webspace's Avatar
Super Spam Talker

Posts: 929
Name: Buck Roberts
Location: Astoria, Oregon, United States
Trades: 0
I don't know how to set up the server to run PHP.

I have one site that is a turn key site with a site file manager that has an online editor. So can I make and HTML doc call on the php script or does it have to be a PHP page?

I downloaded a WYSIWYG PHP editor but couldn't figure it out.

I'm just lost on PHP.

Can you point me in the direction of some good tutorials, or some tips. Free software is always a plus.

Thanks.
webspace is offline
Reply With Quote
View Public Profile Visit webspace's homepage!
 
Old 08-14-2004, 05:33 PM
Unknown.

Posts: 1,693
Trades: 0
Your host should already have php setup...

You just need to add the php into the html where you want it to appear...But it needs to be saved as .php

example

PHP Code:
<html>
<head>
<title>Some HTML Document</title>
</head>
<body>
<table>
<tr>
<td>
<?php include 'navpage.htm'?> 
</td>
</tr>
</table>
</body>
</html>
That way the file included with the php will be displayed in the table...

But remember it needs to be saved as .php for it to work..

You can find some good tutorials @ http://www.w3schools.com/php/

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 08-14-2004, 05:35 PM
Average Talker

Posts: 17
Trades: 0
If you are running a site off of your computer, go to PHP.net and download the installer. Install PHP onto you computer.
Restart.
Then configure your IIS starting page to index.php.
Open your index.html in notepad, Save-As index.php .

Then, lets say your navigation bar is in a table, simple take that whole navigation script, from <table> to </table> and place it in a .txt or .html or anything. Then, in your index.php, where that table information that you put in the .txt, put this script:
PHP Code:
<?php require("pathto/nav.txt"); ?>
Save the document and there you go. any questions, email drip913@hotmail.com

Example Before:

HTML Code:
<html>
<body>
<table border="1"><tr>
<td align="center">
Navigation
</td></tr>
<tr>
<td>
-- Home<br>
-- Links<br>
-- Etc...
</td></tr></table>
</body>
</html>
Lets say thats how your nav bar looks, copy all that, from <table> to </table> and save it into a .txt, delete all of that that you copied, and replace it so it should look like this:
PHP Code:
<html>
<body>
<?php require("pathto/nav.txt"); ?>
</body>
</html>
save that as .php and use the .txt to edit its contents, simple and very effective, i use... extensively.
__________________

Please login or register to view this content. Registration is FREE

Photoshop, HTML, CSS, PHP, and ASP Tutorials for Beginner to Advanced users.
Looking for expirienced Photoshop, HTML, CSS, PHP, or ASP programmers to help run a tutorial site. Contact me.

Last edited by Drip; 08-14-2004 at 05:41 PM..
Drip is offline
Reply With Quote
View Public Profile Visit Drip's homepage!
 
Old 08-14-2004, 10:43 PM Which one do I have to save as php
webspace's Avatar
Super Spam Talker

Posts: 929
Name: Buck Roberts
Location: Astoria, Oregon, United States
Trades: 0
Which one do I need to save as php.

So do I make the Index page index.php

Then the nav page nav.php.

Or do I just name them .htm??

So my nav would look something like this

PHP Code:
<style fprolloverstyle>A:hover {color#FF0000; text-transform: uppercase; font-weight: bold}
</style>
<
table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <
tr>
    <
td width="100%"><a href="http://www.yahoo.com">
    <
font size="2" face="Georgia">Yahoo!</font></a></td>
  </
tr>
  <
tr>
    <
td width="100%"><a href="http://www.msn.com"><font size="2" face="Georgia">
    
MSN</font></a></td>
  </
tr>
  <
tr>
    <
td width="100%"><a href="http://www.google.com">
    <
font size="2" face="Georgia">Google</font></a></td>
  </
tr>
  <
tr>
    <
td width="100%"><a href="http://www.ebay.com/">
    <
font size="2" face="Georgia">Ebay</font></a></td>
  </
tr>
</
table
And my index or template would look like this

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
</head>
<body bgcolor="#FFFFFF">
<?php require("pathto/nav.txt"); ?>
</body>

</html>
But which do I save as .htm and which as .php?

Please explain this tag.
<?php require("pathto/nav.txt"); ?>


Should I format it like this?
<?php require("pathto/http://www.mydomain/nav.txt"); ?>

How does this work?
webspace is offline
Reply With Quote
View Public Profile Visit webspace's homepage!
 
Old 08-14-2004, 11:50 PM
Average Talker

Posts: 16
Trades: 0
name any of the files .php that have php tags in them.


As for

PHP Code:
<?php require("pathto/nav.txt"); ?>
it is simply saying that the nav.txt file MUST be included or cease the script.

If your files are all in the same folder
PHP Code:
 <?php require("nav.txt"); ?>
is sufficient otherwise have the full path.
litebearer is offline
Reply With Quote
View Public Profile
 
Old 08-15-2004, 03:21 AM What is the full path
webspace's Avatar
Super Spam Talker

Posts: 929
Name: Buck Roberts
Location: Astoria, Oregon, United States
Trades: 0
O.K. That makes sense.

What is a full path?
webspace is offline
Reply With Quote
View Public Profile Visit webspace's homepage!
 
Old 08-15-2004, 04:14 AM
Skilled Talker

Posts: 60
Location: Grand Rapids
Trades: 0
full path the the entire path to the root. i.e. c:\inetpub\www or wherever your files are located
__________________

Please login or register to view this content. Registration is FREE
- PHP PhotoGallery
redcircle is offline
Reply With Quote
View Public Profile
 
Old 08-15-2004, 01:24 PM
Average Talker

Posts: 17
Trades: 0
sorry bout that, i did get a little sloppy explaining. yes, this script was pretty much written for this, most of the pages on my website look like this:
PHP Code:
<html>
<head>
<?php require("includes/header.html"); ?>

</head>
<body
<center>
<table border="0" cellpadding="0" cellspacing="4"><tr>
<td valign="top" width="190" align="center">


<?php require("includes/left.html"); ?>

</td>
<td valign="top" width="570" align="center">

<?php require("includes/news.html"); ?><br>
<?php require("includes/footer.html"); ?>

</td>
<td valign="top" width="190" align="center">

<?php require("includes/right.html"); ?><br>

</td></tr></table>
</body>
</html>
__________________

Please login or register to view this content. Registration is FREE

Photoshop, HTML, CSS, PHP, and ASP Tutorials for Beginner to Advanced users.
Looking for expirienced Photoshop, HTML, CSS, PHP, or ASP programmers to help run a tutorial site. Contact me.
Drip is offline
Reply With Quote
View Public Profile Visit Drip's homepage!
 
Reply     « Reply to PHP Site. Please Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54600 seconds with 12 queries