I have uploaded a page with the code below to my joomla root directory.
<?php
$value = trim($_POST['opts']);
if ($value){
$db = "my_db";
$link = mysql_connect('localhost',$me,$my_password);
if(!$link) die("Error 1 ".mysql_error());
mysql_select_db($db);
**$query = "SELECT introtext,fulltext FROM jos_content WHERE title='$value' ";**
$result = mysql_query($query);
**if(!$result) die("Error 2 ".mysql_error());**
$obj = mysql_fetch_array($result);
$obj_f = $obj[0];
$lenght = strlen($obj_f);
$header2 = strpos($obj_f, "Did you know");
$header3 = strstr($obj_f, "Summary");
$third_part = $header3;
$first_part = substr($obj_f, 0, ($header2 - 1));
$second_part = substr($obj_f, $header2,((strpos($obj_f, "Summary")) - $header2) );
}
?>
the problem is that when i change my select(http://sanatural.co.za/sanp/test.php) i get this error message: Error 2 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fulltext FROM jos_content WHERE title='Arthritis'' at line 1
The code highlighted in bold is where i think the problem might be. Please help.