String Operation: string. string
Posted: Thu May 25, 2006 6:14 am
Pimptastic | Please use
The string is correct when printing out (oldComment + Time+ newComment). But in the dbf record only 'oldcomment' was saved.
Any idea why this is happening?
Thanks
Xiaonan
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I was tring to link two strings together and then save it into dbf file.
I used "." to integrate the two string it seems work. But when saving the new string into dbf file, only the first string was save.
Please see the code below:Code: Select all
$dbname= realpath("../data/comment.dbf");
$db = dbase_open($dbname, 2);
$string= $HTTP_FORM_VARS["oldComment"].gmstrftime ("%a %d-%b-%y %H:%M:%S %z", time ()). ':<br>' . $HTTP_FORM_VARS["newComment"];
Printf ("The new comment is: %s ", $string);
$def = array($HTTP_FORM_VARS["theme"],$string);
dbase_replace_record($db, $def,($HTTP_FORM_VARS["SelRecNumber"]+1));
dbase_close ($db);Any idea why this is happening?
Thanks
Xiaonan
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]