Entry tags:
Hooky, thy name is PHP!
It has been quite a long time since I've sat down to do anything resembling programming, and never in a language called PHP, which is now the programming lingua franca of the Internet, having apparently replaced Perl some time ago as the go-to language for creating dynamic Web pages. If nothing else, PHP provides the structure to a number of web applications, including WordPress.
I started small, trying to create PHP code that, when executed, simply causes the code's file to be reloaded. Then I added some FORM fields, which actually were written in HTML (PHP was apparently designed to play well with HTML, so that files can be created containing both PHP and HTML), and got the thing to spit back information entered in the FORM.
In the course of that exercise, I learned quite a bit.
Then came the next step: Take the information entered and use it to search the contents of a glossary database. For now, said database is a text file (not a real MySQL database), but my strategy in doing this sort of thing has always been to take small steps, which makes the debugging process much easier any time things start to break.
So the current status of the project is this: I can enter a string and click a button, whereupon all lines inside the data file that contain that string are output using the HTML term definition markup (<dt>...</dt><dd>...</dd>).
Small steps, that's the ticket.
Cheers...
I started small, trying to create PHP code that, when executed, simply causes the code's file to be reloaded. Then I added some FORM fields, which actually were written in HTML (PHP was apparently designed to play well with HTML, so that files can be created containing both PHP and HTML), and got the thing to spit back information entered in the FORM.
In the course of that exercise, I learned quite a bit.
Then came the next step: Take the information entered and use it to search the contents of a glossary database. For now, said database is a text file (not a real MySQL database), but my strategy in doing this sort of thing has always been to take small steps, which makes the debugging process much easier any time things start to break.
So the current status of the project is this: I can enter a string and click a button, whereupon all lines inside the data file that contain that string are output using the HTML term definition markup (<dt>...</dt><dd>...</dd>).
Small steps, that's the ticket.
Cheers...