Search
Left Quote    I find that the harder I work, the more luck I seem to have.
- Thomas Jefferson    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: a little better description on where to put the code
  This user is online  Guest
  Subject: "a little better description on wher..." Posted: @ 9:32 pm on Nov 30 2005   
Unregistered
hello, thanks for the tutorial, but i have some doubts about in which files i should put the different codes, and if there is anything in the codes i should replace with own information....


thanks alot..

    Viewed: 8,102 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: a little better description on ..." Posted: @ 11:05 pm on Nov 30 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

well, as the tutorial indicates, break your own code up into sections (header, sidebar, footer... etc.) those sections become files of their own (header.php, footer.php (you get the idea)).

So then, for each file of your site, it starts like this:


Code:


<?php include($_SERVE R['DOCUMENT_RO OT'].'/page_h eader.php');
include($_SERVE R['DOCUMENT_RO OT'].'/page_s idebar.php');
?>
<!--BEGINNIN G OF PAGE MIDDLE-->
<p>here is the body of my site, were all the content goes. enjoy!</p> ;
<!--END OF PAGE MIDDLE-->
<? include($_SERVE R['DOCUMENT_RO OT'].'/page_f ooter.php');
?>



Now, include the PHP code provided from the tutorial for page header in your page header.php as the very first lines of code, even before <HTML>.

this is just to make things more simple for you. if you dont want to do it that way, the "page_hea der" code needs to be at the beginning of every page of your site that you want a user recognized.



Edited at 12:04:24 am on 12/01/05


-bs0d | AllSyntax.com

    Viewed: 8,091 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: a little better description on ..." Posted: @ 9:34 am on Dec 01 2005    
Unregistered

ok, thanks... and the register code, should it be saved in an html file or php file, 'm havin some trouble with the register code, as i won't show the page i have made which contains that code.
and where should it be placed... thanks again for your help...



    Viewed: 8,080 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: a little better description on ..." Posted: @ 9:39 am on Dec 01 2005    
Unregistered

and by the way, what are the page-header, page_footer.php files.. i dont' understand that part...



    Viewed: 8,079 Times | Reply to This | To top
  This user is online  Guest
  Subject: "re: a little better description on ..." Posted: @ 9:42 am on Dec 01 2005    
Unregistered

and also, how many pages (html and php) do i need to create, and what code should i include i what pages... i really can't see that i your tutorial.... thanks again for the help...



    Viewed: 8,078 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: a little better description on ..." Posted: @ 4:32 pm on Dec 01 2005    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

if you're using php, i would save them as .php files - the html will be displayed as normal.

depending on the code is depending on where you want the results of the code to be displayed. i think i mention in the article if you can just put the code at the very top of your page or not. Read through, theres been a few topics about the article here on the forums that might answer some questions you have.

you dont understand the page_header / page_footer part? The article directs you to a tutorial, Site Design Made Simple if you dont understand that.

im not thinking you read the entire tutorial. The last page shows you what pages to make and what code to put in each (pg. #9). they should all be .php pages - technically they dont have to be, but it makes things alot easier.




-bs0d | AllSyntax.com

    Viewed: 8,067 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank