Hi,
I'm quite new to all this $_REQUEST stuff and I'm trying to change all my code so that it will work with register globals off (it has to be quite cross platform). The problem I have is when I try to put data from a form into a database.
Here is the code I am using
if($_REQUEST ['title']||$_REQUEST ['date']||$_REQUEST ['summary']||$_REQUEST ['full'])
{
$insertIt=mysql_query("INSERT INTO `mdnews` (`title`, `date`, `summary`, `full`) VALUES ('$_REQUEST [title]', '$_REQUEST [date]', '$_REQUEST [date]', '$_REQUEST [full]') ",$db);
if($insertIt)
{
echo "The newsitem $title has been successfully added<br>";
}
else
{
echo "Sorry there has been an error, please try again<br>";
}
}
The variables are working in the IF statement but I've tried every combination of quotes, double quotes etc to get it to work.
Any help would be greatly appreciated.
Thanks.