|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
lack of Error checking in tutorial code
Hi first let me say thanks for your tutorials.
I have found the PHP tutorial http://codewalkers.com/tutorials/12/4.html basicly very useful. But the code in this tutorial works fine as long as your check one of the 3 checkboxes on the form. But if you don't check any checkbox it generates the following error: Warning: Invalid argument supplied for foreach() in ... Unfortunatly at the moment I don't have enough PHP skill to work out how to write the error checking required to prevent this. Can you add this to the tutorial? Regards, Rupert Russell r.russell at ballarat.edu.au |
|
#2
|
||||
|
||||
|
RE: lack of Error checking in tutorial code
I believe that the idea of the tutorial is to demonstrate checkboxes etc and not to bulk up the example with error handling code. The idea of the tutorials is to demonstrate how to do something and the idea is that the code in most of them can be expanded and worked upon (eg by adding error handling etc).
However it should be quite easy to add basic error handling to this example something like this should do the trick. |
![]() |
| Viewing: Codewalkers Forums > Other > Tutorials > lack of Error checking in tutorial code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|