i just switched hosts, going from php4 to php5 and have a slew of problems with my code now. Can anyone tell me what's going on here?
I'm getting a PHP notice error of:
PHP Notice: Undefined offset: 1 in /var/ on line 76
that points to this code. Anything wrong here?
I'm getting a PHP notice error of:
PHP Notice: Undefined offset: 1 in /var/ on line 76
that points to this code. Anything wrong here?
Code:
if(isset($_POST['submit_create_record'])){
$varorderdate = preg_split("/(-|\/)/",$_POST['orderdate']);
$varorderdate = $varorderdate[2]."-".$varorderdate[0]."-".$varorderdate[1];
$varinvoicedate = preg_split("/(-|\/)/",$_POST['invoicedate']);
$varinvoicedate = $varinvoicedate[2]."-".$varinvoicedate[0]."-".$varinvoicedate[1];
$varstartdate = preg_split("/(-|\/)/",$_POST['startdate']);
$varstartdate = $varstartdate[2]."-".$varstartdate[0]."-".$varstartdate[1];
$varenddate = preg_split("/(-|\/)/",$_POST['enddate']);
$varenddate = $varenddate[2]."-".$varenddate[0]."-".$varenddate[1];