Category Archives: PHP
Links of Interest
The stuff that I’ve been working with today:
jQuery Plugin: Validation See also: demos
metadata plugin
form plugin for AJAX submit
Mastering Ajax, Part 10: Using JSON for data transfer
Also posted in AJAX, JSON, JavaScript, Programming, Technology, jQuery Tagged AJAX, form, jQuery, JSON, plugin Leave a comment
What do I do?
I often get the feeling that most people have no idea what I do down in this dungeon. Here’s a sample:
In the next hour, I will write, test and prove some php and JavaScript+jQuery to present a table of data, allow a user to click a delete icon, use a modal to prompt for delete [...]
Also posted in JavaScript, Programming, Technology, jQuery Leave a comment
Yesterday’s Coding Horror
Yesterday my web application quit working. I simply cleared the domain cookies and the session cookies. It should have been no big deal but an important piece of JavaScript quit working. I have a script that adds some HTML to the DOM and looks similar to:
snafu("<tr><td class=\"fooclass\"><a class=\"expander special\" href=\"index.php\">go somewhere</a></td></tr>");
So this worked fine until [...]
Also posted in JavaScript, Programming, Technology Leave a comment
Always more to learn
No matter how long you do something, there is always more to learn. You’d think that since I’ve been doing HTML coding since around 1993, I’d pretty much know every in and out and every little tag and peculiarity regarding HTML. Not so. See, we form habits. We get into patterns. Specs change but we [...]
Also posted in ColdFusion, HTML, JavaScript, Programming, Technology 2 Comments
Today’s Coding Challenge
In one of my applications, I use jQuery’s UI Datepicker as part of the interface for easy date selection in adding and editing some data. I have two screens that show the current date. One screen is a report that says "Today’s date is…" and shows the current date. The other is the form for [...]
Today’s Programming Challenge
I am working on a PHP application that is mysteriously losing the value of a particular session variable. There is only one place in all the code that the variable is set. All comparisons have been confirmed as comparison operators == instead of assignment =. In debugging a vardump shows the variable as:["foo"]=> &string(2) [...]
Code Buzz
Runners get a runner’s high. I’ve got a coder’s high. My head is buzzing as I’ve been hitting the keys hard. My current PHP application has dynamic content loaded via AJAX but when the user navigates with the browser’s forward or back buttons the state is lost, that is, all the dynamic content disappears. Also [...]
Also posted in AJAX, Daily Life, JavaScript, Programming, Technology Leave a comment
DailyWTF
I wrote this piece of rocket science last night:
<select id="birthdateyear" name="birthdateyear">
<?php for($byear = date("Y",time()); $byear >= 1901; $byear--){ ?>
<option value="<?php echo $byear; ?>" <?php if($birthdateyear == $byear) echo "selected"; ?>><?php echo date("Y",mktime(12,1,1,1,1,$byear)); ?></option>
<?php } ?>
</select>
And that is why you shouldn’t code tired.
Why PHP drives me batty!
Do you use date() or date_format()? Want to have some real fun? Let’s debate the most correct way to read a file!
Also posted in Programming, Technology Leave a comment
Error converting tiff to pdf
So I am trying to deploy the website I recently completed. Deploy? That means move the site from a development server to a production server where the world can see the application in action. It took this long to deploy because the webhost was running PHP 4.0.0 and had to upgrade to at least PHP [...]
Also posted in Daily Life, Programming, Technology 1 Comment
Oh yes! Program done!
I now have successfully written a PHP program that goes to another website, downloads any number of tif files (one test used 48), combines them into a single tif file, converts the tiff to a single pdf file (48 tiffs become a 48 page pdf), and presents the new single pdf and single tif to [...]
Also posted in Daily Life, Programming, Technology 1 Comment
Good Regular Expressions linkage
For you programmer types working through painful regexp problems, you may find The Realtime JavaScript RegExp evaluator very handy. If you are working in PHP, remember that PHP uses a couple of different regexp syntaxes.
Also posted in Programming, Regexp, Technology Leave a comment
PHP is exactly the same on Linux and Windows…