Need some help

jag5311's picture

They have: 202 posts

Joined: Jan 2002

I want to go about doing a database with my site, or something of that nature, so i can update 1 or a few files and it updates my entire site. I think it has to do with ASP, but unfortuntely my web host is Powweb and they do not support asp. What would be my next possible solution? Php?

thanks

bryan:)

Busy's picture

He has: 6,151 posts

Joined: May 2001

You can use anything from javascript to SSI

the javascript way isnt a database way but is similar in including bits, like header, footer, contents etc. downside if someone has javascript turned off they wont get to see your site

SSI - PHP among others are really easy to learn, but if you want a database (you dont have to), you'll need Access, MySQL or something along those lines to run the database.

does your host support PHP and MySQL ?

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Well, i don't belive i necessarily need a database, i mean i am not listing a bunch of items, except for gamecube cheats. Yes powweb does support PHP but i have to have MYSQL installed for 30 bucks. Right now, its not a big deal with my site because the gamecube is so new and there isn't A TON of content/cheats for it yet. But that will change, and i want to be prepared.

What i would like to have done with my site is this:

1. Make it easier to update, so make it so all my pages contain the same menus, poll, date, ect. except for its individual contents (i.e. cheatcodes.htm contains cheat codes, i.e, gamecube shop has 4 sections to go to for shopping for gamecube items) that kind of thing.

2. Set it up so that my A-Z.htm index could be automatically updated through changing 1 or 2 files, not having to open up in dreamweaver a.htm, make the changes, save and upload. Then b, c, ect.... Currently, i have manually have the latest updates on my cheatcodes.shtml page along with the option to see a-z.htm, but that is pointless since the same cheats all reside on one page.

I am not sure what more i could do with PHP, but since ASP doesn't work, i think this is my only route. If you have any more questions, comments or whatever for me, please post them. The more info the better.

bryan:)

They have: 93 posts

Joined: Dec 2001

php/mysql is probably the way to go, a good place to start is php.net there are some great tutorials and links there, also go to http://foxserv.linuxmax.net/portal_database.php?action=view&fid=2&cid=1 and download/install foxserve 2.0 it will install apache/php/mysql on your windows system to you can run everything locally to learn/test your scripts.

Mika

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

As was mentioned, SSI can work for you as well... Simply create a "menu" file (or whatever you want to include in all pages- for now we will call this file menu.html) and insert this code where you want the menu to appear:
(replacing /path/to/menu.html with the actual path to the file)

Good luck,

Brian

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Now see, that makes alot of sense. Thank you. No one ever really explained what to do to get that to work. Hell, i like teh SSI example better then php. ANd this works just as well as something like PHP? What could i be missing out on by doing this instead of PHP?

thanks for the help, this will really help.

Just out of curiosity

If you notice my menu on my site, gamecubecheats.net, would i need to keep the black background ect.. Because i use dreamweaver.

You might need to email me to be more descriptive, but lets see if i get this right.

1. Create my index. Put the info i need on it. Except for the menu, in which i would apply the code you told me. Would it be smart to do that with the top logo also?, or should i limit the amount of SSI i use to take off the stress the server would use?

Now that i think of it, really its the menu i have to worry about isn't it. But with the a-z index, i don't think i could do SSI with that, that would probably be a php issue wouldn't it? Sorry for all teh questions, just need to gain more knowledge in these fields, and you guys/women really help me. thanks

bryan

He has: 424 posts

Joined: Mar 1999

Brian's recommendation would work perfectly and simply for your menu situation but it would not help your a-z situation. The only way to accomplish what you want to do with your a-z pages would be with some type of database (whether it be a simple text database or MySQL) and a programming language like PERL or PHP.

To make the a-z thing work, it would take some time on your part to learn the things you would need to create a dynamic site. It doesn't come easy to most people and it requires a huge time investment so be prepared if you want something like that... In the long run though, it *will* save you time as your site grows.

Regarding the menu situation: You would just basically create a file with your menu information called menu.html or something similar. You could include the logo in this file as that would not cause any problems with load on the server (nothing would increase the affect on the server as the server only makes one call to the file for a page, regardless of what is in that file). Basically, I would do everything I could to include *everything* that is going to stay the same on all of your pages within a file (or 2) that can be edited and I would call them with SSI like Brian recommended.

What I would do is this: Create one index page exactly as you would like it to appear to your visitors - menu, content, everything. Then, go to your HTML code and find the first line of the code that starts where you want to stay constant and copy all of that to the end of where it's no longer constant to a menu.html file.

I unfortunately have to go right now but that should help you out a bit more. I will post some code for you to look over later if I get a second.

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Still quite easy to do with PHP. Just build a file as Brian suggested, menu.html, menu.php, menu.inc, menu, the extension doesn't matter. Doing it with a database you would really just need one template page. Doing it without a database, you would have to create a page for all of your different categories.

What I would do is to build your main index page in dreamweaver how you like it.
Then cut it up into pieces like header.inc, footer.inc, menu.inc or leftmenu/rightmenu, etc. Your pages would look like this:

<?php
include(\"header.inc\");
include(\"menu,inc\");

---Page Contents here---

include(\"footer.inc\");
?>

It makes it quite easy to change the header, footers and menus for all pages at once.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

jag5311's picture

They have: 202 posts

Joined: Jan 2002

ok, im having a problem with the menu.

i copied what my menu is suppose to look like onto a new sheet, saved it as menu.shtml Then once the menu was how i wanted, i saved it.

Then i deleted the menu on my index.shtml and created a small layout cell, then i applied this line of code inside the cell.

since that is the path to the actual menu.

here is a picture of the individual menu file i created
gamecubecheats.net/menu.gif

But if i am correct, i wouldn't see the change until i uploaded onto the server. Well, once i refreshed in my dreamweaver after making the change, it pushed everything off to the side, and distorted everything, and i don't know why. I have the spot i want the menu in, but when I previewed it in my browser it actually pushes everything on teh page around, really distorted.

Im actually creating an example right now. Go to this site to see what it did to my site with that line of code in

gamecubecheats.net/index2.shtml
it looks great here

but check out these pictures of what it actually looks like once i added that line of code in, Dreamweaver doesn't show it very nice, but on the web it looks just fine
gamecubecheats.net/messedup.gif 64kb
gamecubecheats.net/messedup2.gif 50k

jag5311's picture

They have: 202 posts

Joined: Jan 2002

I think im doing something wrong with the menu?

What i really just planned on doing was applying that line of code

To all my pages that i want the menu on, which is all of them. But if its going to alter all the content on each page, then i don't think i will do it, unless however i can get it to work

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Im in shock at that FoxServe site. It is awesome, but everything is text highlightable. There are no images, the tables you see aren't images, how were the tops (titles of each table) created, their color looks like it fades, but you can't save it as an image, you can only save the background which is that of a fox. I know im just rambling on, but it confuses me.

bryan

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

Hi,
They are using the "background" attribute of the TD tag. This is their code:

Hope that makes sense.

Brian

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Hey Brian

I like your site infostar webdesign. Very slick

I have two comments

on your portfolio on this site
http://www.cetaceacorp.com/scuba/

When your mouse hovers the stocking, it brings that window up, but if you move the mouse down slightly, it starts making some jagged movements. Just thought i would point that out.

Also, you might want to take this site off your portfolio if its not up and running
http://www.loltech.com/

Just my 2 cents, but nice layouts and designs

bryan

They have: 93 posts

Joined: Dec 2001

I use php includes for all my pages, a few of my pages look like this

<body bgcolor="#fdfdfd" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000">
<? include("/path/to/directory/with/header.html"); ?>
<? include("/path/to/directory/with/menufin.html"); ?>
<? include("/path/to/directory/with/anmeldung.php"); ?>
</body>
</html>
'

that gives a page that looks like http://www.omahost.com/partner/fin/reg.php

I use the same header & menu on all my pages & also include any other php scripts that are needed, in this case anmeldung.php

I LOVE PHP Laughing out loud :D it's :gandalf:

Mika

taff's picture

They have: 956 posts

Joined: Jun 2001

Quote: Originally posted by yabber
php/mysql is probably the way to go, a good place to start is php.net there are some great tutorials and links there, also go to http://foxserv.linuxmax.net/portal_database.php?action=view&fid=2&cid=1 and download/install foxserve 2.0 it will install apache/php/mysql on your windows system to you can run everything locally to learn/test your scripts.

Mika

How user-friendly is foxserv for someone with little or no serverside experience? This thread has got me drooling to play with SSI (I had no idea it was so simple!) and it would also be nice to be able to test PHP locally

.....

They have: 93 posts

Joined: Dec 2001

Foxserve 2.0 is 1 file, it's just an installer program, click & go, the only configuration you have to do is to give MySQL a user name and password.
MySql then starts everytime you start your PC
Apache is started by clicking an Icon
then type "http://localhost" in your browser and it will show your index.xxx in C://foxserver/apache/www/
It really is as easy as that.
It also includes phpmyadmin for database management, it is a great program. Oh & its free Laughing out loud

Mika

They have: 93 posts

Joined: Dec 2001

Oh & I think that the foxserve site is created using a php portal like the one from http://www.myphpnuke.com/

Mika

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.