Hello all,
I could not solve this problem. There is a mistake in here but i do not know where.
Please help
I could not solve this problem. There is a mistake in here but i do not know where.
Please help
PHP:
{
$desc = str_replace("[", "\r\n", $_REQUEST['description']);
$arrayOflinks = explode(";", $_REQUEST['links']);
// Get Extension of first extry
$extPos = strrpos($arrayOflinks[0], ".");
if ($extPos !== false)
{
$ext = substr($arrayOflinks[0], $extPos+1);
$extL = strtolower($ext);
if (!strcasecmp($extL, "bmp") || !strcasecmp($extL, "jpg") || !strcasecmp($extL, "gif"))
{
$imageTag = "<img src='".$arrayOflinks[0]."' border='0'>";
$arrayOflinks[0]=$imageTag;
}
}
$link = implode("<br>", $arrayOflinks);
$query = "insert into articles (`id`, `type`, `title`, `description`, `links`) values('0', '".$_REQUEST['type']."','".$_REQUEST['title']."','".$desc."','".$link."')";
print $query;
mysql_query($query);
exit();
}




