Other than teaching myself enough html to design simple webpages my knowledge of computer programming stopped with BASIC from the Apple IIc/Commodore Amiga era.
But, I would like to design a presidential election game that could be played online. I’ve tried to teach myself JavaScript and Perl, but I do not know enough about modern computers to get anywhere. I’ve checked books out of the library that will supposedly teach yourself php. But, no matter how new a programming book is, it will be out of date when it comes to downloading and configuring anything needed to make it work is concerned.
But I found Leon Atkinson’s Core PHP Programming 2nd edition at a thrift store. Since it came with a disk I went ahead and bought the book thinking the disk would have whatever is needed to make PHP work on my computer without being online. This book doesn’t even explain how to install the software. I went through the autoplay and installed what is supposed to be Apache for Windows. But running the program only gives me a window that I think is empty; it only flashes on the screen for a second.
Now, I’ve written the 1st program in the book. The book doesn’t explain how to save and run the file, so I assumed that it should be a plain text file with .html like any webpage.
This is the program:
Listing 1.1 Today's Date: <? print(Date("1 F d, Y)); ?>And “Today’s Date:” is the only output. Have I typed something wrong, or did the book leave something out?
I’ve tried it with an added tag and with <?php the way I have seen on the net, but I get the same output. I’ve also saved the file with a .php the way some online tutorials say to, but this only gives the code for the program as output.
Do I have another computer book that should go to the recycling bin?