/ Published in: JavaScript
Add file updaterow.php and include js-code to your page.
updaterow.php
db_host, $CFG->db_name, $CFG->db_user, $CFG->db_pass);
$Dtb->connect();
$Session = new Session();
$Base = new Base();
$Auth = new Auth();
error_reporting(1);
$fieldname = $Base->convert_post_get("fieldname");
if(!$fieldname) exit();
$content = $_GET['content'];
list($field, $ind) = explode('-', $fieldname);
$sql = "update `b_aboard_msgs` set `$field` = '$content' where `id` = $ind";
$Dtb->query($sql);
echo $content;
?>
updaterow.php
db_host, $CFG->db_name, $CFG->db_user, $CFG->db_pass);
$Dtb->connect();
$Session = new Session();
$Base = new Base();
$Auth = new Auth();
error_reporting(1);
$fieldname = $Base->convert_post_get("fieldname");
if(!$fieldname) exit();
$content = $_GET['content'];
list($field, $ind) = explode('-', $fieldname);
$sql = "update `b_aboard_msgs` set `$field` = '$content' where `id` = $ind";
$Dtb->query($sql);
echo $content;
?>
URL: http://www.bistro-site.com