...

View Full Version : Replace Record In .dbf



Kura_kai
06-16-2005, 12:55 AM
I am having problem with a php script that replaces the first record in a .dbf file. The record only has one field and that is a boolean one here is the script


<?php
$db = dbase_open("../status.dbf", 0);
if ($db) {
if($_POST['R1'] == "V1")
{
$row = array(1);
dbase_replace_record($db, $row, 0);
Echo "Changed Status To Online";
}
else
{
$row = array(2);
dbase_replace_record($db, $row, 0);
Echo "Changed Status To Offline";
}
dbase_close($db);
}
else
{
Echo "Couldn't Change Settings";
}
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum