Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-15-2005, 11:55 PM   PM User | #1
Kura_kai
Regular Coder

 
Join Date: Dec 2004
Posts: 202
Thanks: 0
Thanked 0 Times in 0 Posts
Kura_kai is an unknown quantity at this point
Replace Record In .dbf

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 Code:
<?php
$db 
dbase_open("../status.dbf"0);
if (
$db) {
  if(
$_POST['R1'] == "V1")
  {
    
$row = array(1);
    
dbase_replace_record($db$row0);
    Echo 
"Changed Status To Online";
  }
  else
  {
    
$row = array(2);
    
dbase_replace_record($db$row0);
    Echo 
"Changed Status To Offline";
  }
  
dbase_close($db);
}
else
{
  Echo 
"Couldn't Change Settings";
}
?>
Kura_kai is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:33 PM.


Advertisement
Log in to turn off these ads.