Redesigning and re-branding EN World


log in or register to remove this ad

PHP is a powerful language my friend :)

Read part:
1) Before the actual site is loaded, the website looks if there's a cookie file on the computer. If it is, it loads one of the schemes with variables storing color values. If there is no cookie, it use the default scheme.

Save part:
1) You select a scheme and press the OK button.
2) Now the website transfers you to the saving spot. Here, the server looks at the data sent (the color scheme selected), and it saves that data in a cookie file that will delete itself in one year.

Various stuff.

Look at the above sample file: I have defined a color as $bgcolor instead of a normal value. So in the index.php file instead of writing bgcolor=#000000 i write
bgcolor="<? echo $bgcolor; ?>"
 

Here is the code. Just DON'T PANIC!

To run this code on your computer, you need a webserver installed, as PHP is a serverside language which means it runs on the server unlike HTML than runs on your own machine. If you want to play around with this I suggest you to install PHPTriad. It is VERY EASY to install (you click "ok" and it's done) :)

http://prdownloads.sourceforge.net/phptriad/phptriadsetup2-11.exe?download

If you want to try playing with PHP I can send you the rest of the files. I recommend it, it's a fun language. Reference can be found here: www.php.net/manual/en

Right click then SAVE AS to download the code and view it correctly
 

Attachments

Last edited:

As a note the drop downs do not work on the latest build of mozilla 1.1 beta.

A second comment, noting that you are currently using plain html for near everything, if you plan to make a language switch, I would go with java... it pretty much has taken over the server side market, and scales far better than php or perl (the only other real alternatives). Java is *the* server side language these days, if you want an example of how well it can work, and how easy:

www.valdier.com/backup/monsterFinder

I am planning to submit this link to your site as a community tool as soon as I get CR's < 1 working... but note that everything you see on that site is all done from the same web page... the url never changes because it literally is all one page doing a bunch of java stuff in the background and just showing what people want to see in the foreground.
 
Last edited:

Valdier said:
As a note the drop downs do not work on the latest build of mozilla 1.1 beta.

A second comment, noting that you are currently using plain html for near everything, if you plan to make a language switch, I would go with java... it pretty much has taken over the server side market, and scales far better than php or perl (the only other real alternatives). Java is *the* server side language these days, if you want an example of how well it can work, and how easy:

www.valdier.com/backup/MonsterFinder

I am planning to submit this link to your site as a community tool as soon as I get CR's < 1 working... but note that everything you see on that site is all done from the same web page... the url never changes because it literally is all one page doing a bunch of java stuff in the background and just showing what people want to see in the foreground.

Waaah!! Java is dang slow compared to PHP and Perl, and it has not "taken over the market". Is it even open source?
 

I don't really have time to learn anything major.

Another problem occurs to me - the current news page is on a W2K server (because of the ASP elements of the ad banners, the reviews pageand other stuff).

The server this messageboard is on is LInux (as you can tell, because the boards use PHP). So I have a problem with parts of the site needing W2K and other parts needing Linux.
 

Psionicist said:


Waaah!! Java is dang slow compared to PHP and Perl, and it has not "taken over the market". Is it even open source?

This really doesn't need to get into a slashdot "mine is more open source than yours" discussion. Reality is, nobody cares if it is open source as long as it is free. The source code for all of java is available but it is not free as in GNU. As a second note, I would be willing to put money up against java outperforming php for serverside tasks. I would be willing to put money on java for outperforming many c++ operations. Because java is run time compiled it allows the compiler to optimize for the specific task, operations, and platform it is running on. The idea that java is slow is possibly the most antiquated thinking amongst uninformed programmers, primarily those that have never used the language. Java was slow in it's first release, it is an extremely fast language these days.

Another point I made, PHP is known to not scale well, in comparison to Perl, sure... it does better, but compared to a real language, it is far from enterprise capable. If you would like documentation to go with these claims I made, I am always willing to offer them to backup my statements. If you can show me somehow that your claim of it being slow is true... I would love to see it. Forrester Research places java in well over 50% of the Global 3,500.
 

Morrus said:
I don't really have time to learn anything major.

Another problem occurs to me - the current news page is on a W2K server (because of the ASP elements of the ad banners, the reviews pageand other stuff).

The server this messageboard is on is LInux (as you can tell, because the boards use PHP). So I have a problem with parts of the site needing W2K and other parts needing Linux.

What web server specifically? IIS?

Java of course works on any platform/hardware, PHP works on most also.
 



Remove ads

Top