Is it possible to place something on one page, and then have it appear on every other page? For example, if I wanted a picture on every single page on my site in the same exact sopt, would it be possible without having to go through and edit all my pages?
Putting something on every page...
Hi,
Yes you can make that. You must create a PHP page. Take your photo on a php file (with HTML codes) and change your extention to .php. And now, make a Include to your pages how you will to affect this picture, to do that you must in your page where you will so your images was shows type that :
<? include ("youfileinphp.php"); ?>.
So you can edit this file content your images and in all the pages how you have take this PHp code will be affect.
Bye.
=> I'm french, i speak not english very well :$ sorry...
Yes you can make that. You must create a PHP page. Take your photo on a php file (with HTML codes) and change your extention to .php. And now, make a Include to your pages how you will to affect this picture, to do that you must in your page where you will so your images was shows type that :
<? include ("youfileinphp.php"); ?>.
So you can edit this file content your images and in all the pages how you have take this PHp code will be affect.
Bye.
=> I'm french, i speak not english very well :$ sorry...
I'm confused by that...>_>
Sorry.
Sorry.
| Dark_Jedi06 wrote: |
| ...would it be possible without having to go through and edit all my pages? |
| MicrosoftMan wrote: | ||
|
I use the HTML editor with cPanel and Notepad...probably a bad idea. Can you point me to any Dreamweaver tutorials?
I had a similar problem, and all i kew was front page!
But i solved it trhough Inline frames. You see my template, i.e (Images, background, lines etc etc) were on the main page, Including the menu contents, and the menu contents pages used to change within an inline frame of the main webpage, meaning the content page changed without the whole site reloading all over again. Bu ne ways, for you id suggest Dreamweaver, or u cud even give this a try!
But i solved it trhough Inline frames. You see my template, i.e (Images, background, lines etc etc) were on the main page, Including the menu contents, and the menu contents pages used to change within an inline frame of the main webpage, meaning the content page changed without the whole site reloading all over again. Bu ne ways, for you id suggest Dreamweaver, or u cud even give this a try!
I edited and replaced this message with sumthing else, cuz i accidentally double posted, plz no affence Mr Moderator! My connection was too laggy to i double clicked the submit button! 
I'll make it as simple as possible ^.^
Assuming that you want to create a header that would go in all of your pages. Let's also assume that this is what you want your header's code to be:
In order to make this code appear in all of your pages without using the copy-paste method, you could create a header file containing the header code and include them in all of your pages. Confused? Let me make it more clear.
First, create a file using notepad where you will put your header codes in. Save as filename.php. Note the php extension. For our sample's sake...
header.php <- the filename I want
Now we will edit the files you want to place the header in. For example, you want to place the header in index.html. Before you could include the file, you must first change its extension into .php and remove the starting html tags. Going back to our example...
index.html
index.php
What the hell does <?php include("header.php") ?> mean?!
Well it means that you want to include the file header.php in index.php. Now when the server reads your php files it will display it in our browsers as...
I hope that this helps. ^.^
Here is what your directory will look like...
Before
After
Last edited by bluetenshi on Fri Oct 14, 2005 8:12 am; edited 1 time in total
Assuming that you want to create a header that would go in all of your pages. Let's also assume that this is what you want your header's code to be:
| Code: |
| <html>
<head><title>Common Title</title></head> <body> <h1>Common Title</h1> <img src="header.jpg" alt="Header Picture" /> |
In order to make this code appear in all of your pages without using the copy-paste method, you could create a header file containing the header code and include them in all of your pages. Confused? Let me make it more clear.
First, create a file using notepad where you will put your header codes in. Save as filename.php. Note the php extension. For our sample's sake...
header.php <- the filename I want
| Code: |
| <html>
<head><title>Common Title</title></head> <body> <h1>Common Title</h1> <img src="header.jpg" alt="Header Picture" /> |
Now we will edit the files you want to place the header in. For example, you want to place the header in index.html. Before you could include the file, you must first change its extension into .php and remove the starting html tags. Going back to our example...
index.html
| Code: |
| <html>
<head> <title></title> </head> <body> ... code ... </body> </html> |
index.php
| Code: |
| <?php include("header.php") ?>
... code ... </body> </html> |
What the hell does <?php include("header.php") ?> mean?!
Well it means that you want to include the file header.php in index.php. Now when the server reads your php files it will display it in our browsers as...
| Code: |
| <html>
<head><title>Common Title</title></head> <body> <h1>Common Title</h1> <img src="header.jpg" alt="Header Picture" /> ... code ... </body> </html> |
I hope that this helps. ^.^
Here is what your directory will look like...
Before
| Code: |
|
. .. index.html gallery.html |
After
| Code: |
|
. .. index.php header.php gallery.php |
Last edited by bluetenshi on Fri Oct 14, 2005 8:12 am; edited 1 time in total
Sorry...I'm still confused.
Where do I upload the php file to? And how exactly do I get it to show on a page...>_>
Where do I upload the php file to? And how exactly do I get it to show on a page...>_>
I think I made is as clear as I could. Please read it thoroughly... Perform the instructions step by step. I edited my past post to show the directory structure before and after the steps are executed.
How many pages do you have? I mean you can make the simple and easy ctrl+c --> ctrl+v method, that costs nothing.
Also if you want, I think, you can use an external Style Sheet (CSS) for every page. If you know what on earth is that I will send a HowTo.
Also if you want, I think, you can use an external Style Sheet (CSS) for every page. If you know what on earth is that I will send a HowTo.
| Dark_Jedi06 wrote: |
| Sorry...I'm still confused. Where do I upload the php file to? And how exactly do I get it to show on a page...>_> |
You upload php's like normal html with your FTP-program. I'm not sure if you can save php's in online editor
Last edited by SamiTheBerber on Fri Oct 21, 2005 1:33 pm; edited 1 time in total
Thank you for that very concise explaination. I've just started playing with PHP a little bit for my site and didn't understand much of what I was doing, but you've just provided my first, comprehensible, php lesson.
It is very easy and well explained.
It is very easy and well explained.
Thanks too. Feels good to know you've help someone ^.^ BTW, if you have more questions regarding PHP, I would be happy to help. What I've written was just about the include function. There's alot more to learn so if you have any problem in understanding PHP, you could always ask me =)
PHP is something I have started learning since I started working with a website that uses PHP. It makes it much easier to make changes and updates. If you know C or C++ or Turbo Pascal, PHP should be easy to learn. Sadly, I'm not very familiar with C++, or Turbo Pascal anymore.
bluetenshi, are you familiar with MySQL? Once I finish my sie, I wanted to make a back-end editor to update it easily by just filling in fields an having it post it up.
bluetenshi, are you familiar with MySQL? Once I finish my sie, I wanted to make a back-end editor to update it easily by just filling in fields an having it post it up.
i just redid my frames site w/ php includes
it works fine
it works fine
ya use a template....are u using dreamweaver?
