線上書籍

Home

[1042] XOOPS模組開發進階

<?php include "header.php"; if($_POST['op']=="textarea"){ $_POST['value']=str_replace("<br>","\\n",$_POST['value']); } $sql = "update " . $xoopsDB->prefix("phone_book") . " set `{$_POST['id']}`='{$_POST['value']}' where sn='{$_POST['sn']}'"; $xoopsDB->queryF($sql); if($_POST['op']=="textarea"){ echo str_replace("\\n","<br>",$_POST['value']); }else{ echo $_POST['value']; }