24 lines
489 B
PHP
24 lines
489 B
PHP
|
|
<?php header('Content-type: application/json');
|
||
|
|
|
||
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/cmeter/');
|
||
|
|
|
||
|
|
include(PATHTOINCLUDES."base.php");
|
||
|
|
|
||
|
|
$em="";
|
||
|
|
|
||
|
|
|
||
|
|
$thetext=$_POST["thetext"];
|
||
|
|
|
||
|
|
$thelink=$_POST["thelink"];
|
||
|
|
|
||
|
|
$sql="INSERT INTO bate_blogs_links (thelink,thetext) VALUES ('".$thelink."','".$thetext."')";
|
||
|
|
|
||
|
|
$query=$database->database_query($sql) or $em=$em.$database->database_error();
|
||
|
|
|
||
|
|
$arr = array ('error'=>$em);
|
||
|
|
|
||
|
|
echo json_encode($arr);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
?>
|