My First Usable PHP Script
Monday, December 19th, 2011Maybe I should not claim this as ‘my first script’ because it is just an implementation of code, but I did make something that is useful to me using PHP. I have been interested in learning a bit more about PHP as it is an important scripting language used in web development. I have a project in mind that will require more knowledge and this is a first baby step in gaining that knowledge.
I set up a form to input necessary data and produced an action page to present the data in a format that is useful to me. I need code for my book of the day rotator on the Mixing Live Sound site. The old system with the bookstore partner generated the code easily, but they changed the system making more work for me. The script takes the necessary information and generates the code that I need for the rotator. This is much easier than writing each line of code myself and making sure that it is all formatted correctly.
The action page produces a preview of the ‘book of the day’ ad and has a code box with the need code. The preview was an unintended consequence but I like the way the data is presented now and the preview is a useful addition of which I had not planned. I have a couple of tweaks in mind and I need to collect a bit more data and I will be ready to produce my rotator file. I will probably use the same basic input form with a different action page with some minor modifications to generate the entries for my new bookstore page. The old bookstore page used the old code that no longer works with the new system.
I need to get this done so that I can get on with the bigger project. If it turns out well and is well received I may even offer it as my first product. When (if) I have something to show I will tell you about it here.