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: IS THIS POSSIBLE?
  This user is offline  retarded
  Subject: "IS THIS POSSIBLE?" Posted: @ 2:19 am on Jun 27 2007   
Member #: 357
Rank: User - (18)
Since: 06/26/07
Posts: 22

OK so i just got done with some great tutorials about creating a register script and the login script.. got some great feedback from you guys.. LOVE THIS Site i might add

now im curious to know if this is possible.. I want to make a linkbar.php and i want all my main links to be programmed here, instead of having them on the pages, would save me time programming.

Then i just want to call it out on all the pages, like if i make a top10.php page i just want to put a code in there that shows all the links like | home | pc | Vista | Xbox | Help | etc..

If you think this is a stupid request just read my name


    Viewed: 8,607 Times | Reply to This | To top
  This user is offline  WintersDance
  Subject: "re: IS THIS POSSIBLE?" Posted: @ 2:25 am on Jun 27 2007    

Member #: 353
Rank: User - (27)
Since: 06/19/07
Posts: 36
From: California

You want to include your links on every page correct? You can do one of two ways that should be fairly easy.

1) Create a page called linksbar.php (or whatever name you wish) and place all your links there like you would for any menu, formatting it with HTML. Then you would include it in all the pages using this code below:

include('links bar.php');

2) Second way is just to make a function called menu() and have your menu/links formatted there like tis:

function menu() {
echo "Link&qu ot;; //format your link here
echo "Link&qu ot;; //format your link here
echo "Link&qu ot;; //format your link here
echo "Link&qu ot;; //format your link here
}

then place menu(); where ever the links need to be called up.




wintersdance |     Viewed: 8,600 Times | Reply to This | To top
  This user is offline  retarded
  Subject: "re: IS THIS POSSIBLE?" Posted: @ 2:42 am on Jun 27 2007    
Member #: 357
Rank: User - (18)
Since: 06/26/07
Posts: 22

would you say thats smart... or efficient.. are there better ways.. Thanks dude.. im surprised i got a response this fast.




    Viewed: 8,597 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: IS THIS POSSIBLE?" Posted: @ 2:53 am on Jun 27 2007    

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




-bs0d | AllSyntax.com

    Viewed: 8,590 Times | Reply to This | To top
  This user is offline  WintersDance
  Subject: "re: IS THIS POSSIBLE?" Posted: @ 2:54 am on Jun 27 2007    

Member #: 353
Rank: User - (27)
Since: 06/19/07
Posts: 36
From: California

If you are designing a website with many pages, it would make sense to use includes or functions to call up your heading, footer, menu, sidebars, etc... This way making one in one location will affect the whole site, thus saving you much time then trying to manually update each page to reflect those changes.




wintersdance |     Viewed: 8,588 Times | Reply to This | To top
  This user is offline  retarded
  Subject: "re: IS THIS POSSIBLE?" Posted: @ 5:25 am on Jun 27 2007    
Member #: 357
Rank: User - (18)
Since: 06/26/07
Posts: 22

Ok Cool... now i gota find a tutorial on how to do that..

im gona give it a try my self first tho.. see what i learned.. i know i wont have to include any db_connect statements or $ob_start() statements... im asuming i only create the links. with the design and colors.. and then just do require($_SERVE R['DOCUMENT_RO OT'].'/links. php');

let me know if my asumption is WAYYYYY off.. lol


oh and check out another post i made.. im sure its easy for you geniouses http://www.all syntax.com/foru ms/view.php?f=5 &t=185



Edited at 06:44:06 am on 06/27/07


    Viewed: 8,580 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