Quiz Page php The php quiz has changed! We have replaced php questions with answers! And from those answers you'll find further links to even more information - forums where you can ask questions, training courses, longer articles, and more. [link to quiz index] ...
If you really want the old quiz
questions, you can find them
here,
here,
here and
here ... and
with onward links to the possible answers to each question too.
LAMP - Linux, Apache, MySQL, PHP - install, configure, administerLinux - Apache - MySQL - PHP. The "LAMP" combination that serves many web sites - including ours - these days.
Linux provides the underlying computer operating system on which the other elements ...
PHP - Object Oriented Design in useA web server access log file contains a whole series of hit records ... each of which is logically turned into an object as different fields have different characteristics. These hit objects can then ...
Dynamically watching your web site via a PHP wrapperOn our web site, we "wrap" all of our pages in a PHP shell, which allows us to reference extra information easily within any of our pages, provide up to date course and hotel data on every page, and ...
What is all this SESSION stuff about? (PHP)If you're booking an airline flight online, you'll be taken through a series of screens to select route, dates, times, passengers, seats, then to enter payment details, and perhaps visa / government ...
Improving your function calls (APIs) - General and PHPSome of the code at the Civil Service Department (CSD) where I worked on manpower planning models some 35 years ago would not have stood up to analysis against modern programming practice (but then ...
Uploading an image, document or pdf via a browser (php)One of the most popular scripts on our web site is a demonstration, with full source code, of how you can upload data from a browser, store it into a MySQL database, pull it back from that database, ...
Exception handling in PHPPHP has exception handling - where you can try a block of code; it it completes, that's good and normal, but if something doesn't work in the normal manner an exception is thrown, and a piece of code ...
Adding extensions to PHP Open Source applications - callbacksOver the last two days, I've installed and configured MediaWiki, WordPress, Status.net and Drupal on one of our training systems, and looked (in each case) at how to configure them and install extra ...
Static class members in PHP - a documented exampleWithin a class, you can have dynamic or object variables and methods, where the code and the values associated with it are applied to individual objects. They're far and away the majority of your ...
How to build a test harness into your PHPI was writing a PHP demonstration yesterday, and I wanted to include a test harness with my class definitions that I could leave in place on the live code on my server, to be silently skipped over ... ...
Improve your PHP on a weekend awayI'm delighted to announce two new weekend events - courses on which you can learn or improve your PHP - and enjoy yourself too.
The first weekend - at the Intermediate level - is described here. ...
Compile but do not run PHP - syntax check onlyThe -l option to PHP on the command line compiles but does not run the code in the file - so it's very useful for syntax checking your code.
Here's an example where I tested a file with a deliberate ...
Object Oriented Programming in PHPNew ... for the first time ever ... our Object Oriented PHP Programming training course is running on a Monday. That's Monday, 26th April 2010. It then revert to Friday - its more normal day of the ...
A PHP example that lets your users edit content without HTML knowledgeScenario one. I need a "todo" list page for our web site which I, and the rest of our team, can view and update quickly and easily.
Scenario two. Dave wants to provide his local cricket club's ...
Shipping a test harness with your class in PHPIf you're writing a class (or group of classes) into a file you include into your main application(s) in PHP, you'll be recommended to keep the included files out of the document path so that they ...
How to show a large result set page by page in PHPOne of the major requirements on dynamic web pages is for them to present selected results from a data set.
If the results will nicely fit on one page, that's good - but if there are too many for a ...
Static variables and ampersands in PHPIf you call a function within your program, the last thing you usually want is to have the debris from a previous call left over and effecting how it runs. The fact that you previously looked for a ...
Curly braces within double quoted strings in PHPIn PHP, you can include a variable name within a double quoted string and the variable will be expanded as the string is used - this means that double quotes are actually an operator, whereas single ...
Your PHP code does not work? Here is where to start looking.If people take the trouble to write to me and ask for help when one of the examples on our web site isn't working for them, the least I can do is to provide them with a few pointers.
But it's really ...
Reducing image size on digital photos - PHP Working on the image library, I'm wanting to have all my resources / pictures available via a web site ... but I really don't want to hold them at full resolution - for our needs, 800 x 600 is quite ...
Moving the product forward - ours, and MySQL, Perl, PHP and Python tooI have just posted a "steady as she goes" message, welcoming the new decade but reassuring our customers that we're carrying on offering very much the same high quality courses, and the same high ...
Scraping content for your own page via PHPIf your PHP allows for remote URLs to be handled / read as if they were files (and that's the default), you have useful tool which lets you include the content of one web page (or part of it) within ...
When should I use Java, Perl, PHP, or Python?Java is a good language for bigger systems ... teams of programmers writing bits of code that interact with each other. In fact, Java is so well tuned towards the bigger systems that it's not the ...
A variable number of arguments in a PHP functionDo you want to vary the number of arguments you pass in to a PHP function?
loadarticles(2,3,6,5,4);
loadarticles(5,7);
Simply declare your function with a minimum ...
MySQL stored procedures / their use on the web from PHPAre there times when your PHP will pull a large result set back from MySQL, or have to make a large number of queries, just to further process the data into a relatively small dynamic section of a ...
Abstract classes, Interfaces, PHP and JavaAbstract classes, Interfaces, PHP and Java
Basics.
When you design code for a number of different similar type of thing (object types, classes) you don't start from scratch in each case - you ...
Controlling, supressing, enabling PHP error messagesQ: "How can I suppress the PHP error messages?"
Q: "I get no error messages - how can I tell what is going wrong in my PHP"
Q: "Can I replace the PHP error messages with my own"
However PHP is ...
Using print_r in PHP to explore mysql database requestsThe print_r function in PHP lets you "print raw" the contents of a variable - great for debugging and far better that print which - if you pass it an array helpfully says Array
Embed your print_r ...
Not just a PHP program - a good web applicationA very busy week so far ... station pickups, a PHP course, hosting an external luncheon meeting and hotel guests at Well House Manor, and providing a venue for, and attending, a meeting of the ...
Are you wanting to learn PHP? Are you wanting to learn PHP? Select a course that starts and ends at the right points!
You may (or may not) already know all the background stuff about web sites. And you may (or may not) have ...
Using a cache for efficiency. Python and PHP examplesAsk yourself "how long is it (in seconds) from 5.36 a.m. and 20 seconds to 6.04 a.m. and 39 seconds".
Have you worked that out?
Now - how long is it (in seconds) from 5.36 a.m. and 20 seconds to ...
Geocoding - converting address to latitude / Longitude with PHP via GoogleWe have a 'geocoding' example here, and indeed I was using it earlier today. The idea is that someone enters part of an address on your web site, and you contact Google to look up the latitude and ...
World Flags in your PHP pagesThe world's flags are often used to give a quick visible international indication of countries (sidestepping the issue I had yesterday, where I was translating into ten languages and wanted links to ...
Uploading and Downloading files - changing names (Perl and PHP)When you are uploading a file to a server via http (in Perl or PHP), where is the file saved, and what is it called? And when you download a file, where is it saved on your local disc, and what name ...
How to make a Risotto (PHP build style)Written on last night's long flight ... posted today
Talking with Gisela, seated next to me on this Mexicana flight, I have learned why my Risottos are always sticky. Basically, wrong ingredients and ...
Extracting real data from an exported file in PHP or Perl"Just give me the data". Where there's a requirement to take data from another program into a Perl or PHP script, it's often easier simply to take the data in a format that it's offered / exported ...
Debugging multipage (session based) PHP applicationsPHP's print_r function allows you to dump out the contents of a variable - and that includes more complex variables like arrays containing other arrays, objects, etc ... in a human (programmer!) ...
PHP preg functions - examples and comparisionpreg_match('%CheckUpdateTime(.*?)Main content end%s',$stuff,$gotten);
preg_match_all('%(<td class="destination">.*?)</tr>%s',$gotten[1],$service);
foreach ($service[1] as $train) { ...
Grouping rows for a summary report - MySQL and PHPIt's quite quick and easy to write a loop that goes through a mysql result set and displays the content on an HTML page (but remember security of data, size of resulting HTML page, and the need to ...
Past PHP delegates / others - coding help needed for next 3 monthsTo past delegates and other technical contacts ... I had a lunchtime meeting yesterday with a director who is working on a major PHP application and has urgent need of extra coding staff for a ...
|