Insert A;?
$conn = @mysql_connect (' localhost:3306 ', ' Test ', ' test ');
Include_once "js.class.php";
Include_once "pager.class.php";
Include_once "whxbb.class.php";
Include_once "whxbb_article.class.php";
The above code is best placed in one of the included files
$article = new Whxbb_article ();
$result = $artcile->insert (' Today's weather ', ' whxbb ', ' local rain in Beijing today ');
If an error occurs, eject the error message and return to the previous page (entry page)
if (Whxbb::iserror ($result)) {
New Whxbb_error ("Error:".) $result->getmsg (). "(" . $result->getno. ")", 1, Whxbb_error_alert + Whxbb_error_return);
or the following custom error
New Whxbb_error ("Add failed, please try again later", 1, Whxbb_error_alert + Whxbb_error_return);
}
Else
{
Js::alert ("add success");
Skip to specified page
Js:goto ("add.php");
}
?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.