Hi I need to use PHP (ver 4 windows) to add a record to a dBase iv database.

I can  create, open, read and close a database but when I try to add a
record I always get  the following error:
Warning: unexpected error in C:\php\phpstuff\addTest1.php on line 23

Here is the code [shortened] that I use to create the database table, open
the table, create the record and add the record- the database table has one
field a 10 char string:

$dbname = "test1.dbf";
$dbflag = 2;
$def = array( array("name",     "C",  10));
dbase_create($dbname, $def));
$db_num = dbase_open($dbname, $dbflag);
$new_record['name'] = 'xxxxxxxxxx';
dbase_add_record ($db_num, $new_record);

any help, advice or code samples would be very appreciated

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to