RE: [PHP-WIN] Date Problem

2012-06-21 Thread Toby Hart Dyke
The date_add() function is your friend here. You will need to define what happens when the start date is something like Nov 30th. When is the first service due after that? If you use date_add() to add three months, it will return March 1st (in a non-leap year). Your first step should be to define

RE: [PHP-WIN] Determining an external function/method's argument/parameter listing..?

2012-06-12 Thread Toby Hart Dyke
You need to take a look at reflection in the PHP manual (http://www.php.net/manual/en/book.reflection.php). From the introduction: "PHP 5 comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions, methods and extensions. Additionally, the reflec

RE: [PHP-WIN] Simple error handling/catching/avoidance

2012-06-08 Thread Toby Hart Dyke
The problem is noted here (http://www.php.net/manual/en/language.exceptions.php): >Internal PHP functions mainly use Error reporting, only modern Object oriented extensions use exceptions. However, errors can be simply translated to exceptions with >ErrorException. One possible solution (noted h

RE: [PHP-WIN] junk from my forms output

2011-10-19 Thread Toby Hart Dyke
What are you writing your php files with? It looks like you're using a word processor or Front Page, and saving as RTF or whatever nasty format FP uses. You have to save as a raw ASCII text file. Toby -Original Message- From: hanson zhou [mailto:hmz...@gmail.com] Sent: Wednesday, Oct

Re: [PHP-WIN] Re: [PHP] Which versions of Apache will PHP 5.3.6 work with??

2011-03-25 Thread Toby Hart Dyke
On 3/25/2011 3:15 PM, somebody wrote: On Fri, Mar 25, 2011 at 12:12 PM, Tommy Pham wrote: On Fri, Mar 25, 2011 at 10:52 AM, Curtis Tammany wrote: Help!! I am in a Windows environment (XP SP3 for development and Server 2003 for production. I have to upgrade to PHP 5.3.6. It does not appear to

Re: [PHP-WIN] Problem with php and MySQL: inserting strings into database

2010-04-23 Thread Toby Hart Dyke
Apart from Warren's excellent advice, the source of your problem is things like this: '$_POST['vorname']' How is PHP supposed to know that this is nested parentheses? You should have done it like this: "$_POST['vorname']" Though of course, follow Warren's advice, and don't do it like this a

Re: [PHP-WIN] Send Mail from PHP Using SMTP Authentication

2010-04-13 Thread Toby Hart Dyke
On 4/13/2010 2:54 PM, Alice Wei wrote: I tried installing the Pear Mail package, it is now located in php/PEAR/Mail, and my code is located in the htdocs. Here is the code: $host = "smtp.att.yahoo.com"; Although you have other problems (see below) this is unlikely to work. When sending ema

Re: [PHP-WIN] Trouble running a select query against a database, when I know the connection is working, and the data is there

2010-04-13 Thread Toby Hart Dyke
On 4/13/2010 9:36 AM, Jacob Kruger wrote: $qry = mysql_query($sql); $arr = mysql_fetch_array($qry); if ($arr.count > 0) { echo ""; while($row = mysql_fetch_array($arr)) You retrieve a row, check if it has any elements, then attempt to retrieve the next row, using the array you just created as