I have been trying to add a flash portal to my site, it isn’t easy. I am stuck on the code that sends all the info from the forum, to the mysql database. So then that info can be displayed next to the flash in the flash portal. If you can spot what I am doing wrong please tell. Here is the php code. :)
$fileuploaded = 'upload/'.$file_name.'.swf';
//unlike the file upload script this does not need to be the full path to the directory
$date = date('F jS, Y'); //gets the date added by simple PHP date function
$date = addslashes($date); //we must add slashes to everything before entering it into the database
//add slashes to other variables
if ($website){$website = addslashes($website);}
if ($description)
{
$description = addslashes($description);
}
else
{
$description = 'N/A';
}
$name = addslashes($name);
$title = addslashes($title);
$width = addslashes($width);
$height = addslashes($height);
$category = addslashes($category);
//enter information into database creating a new row
$query = "insert into flash
set author='".$name."',
title='".$title."',
website='".$website."',
email='".$email."',
width='".$width."',
height='".$height."',
description='".$description."',
userfile='".$fileuploaded."',
category='".$category."',
date='".$date."'";
$result = mysql_query($query);
$fileuploaded = 'upload/'.$file_name.'.swf';
//unlike the file upload script this does not need to be the full path to the directory
$date = date('F jS, Y'); //gets the date added by simple PHP date function
$date = addslashes($date); //we must add slashes to everything before entering it into the database
//add slashes to other variables
if ($website){$website = addslashes($website);}
if ($description)
{
$description = addslashes($description);
}
else
{
$description = 'N/A';
}
$name = addslashes($name);
$title = addslashes($title);
$width = addslashes($width);
$height = addslashes($height);
$category = addslashes($category);
//enter information into database creating a new row
$query = "insert into flash
set author='".$name."',
title='".$title."',
website='".$website."',
email='".$email."',
width='".$width."',
height='".$height."',
description='".$description."',
userfile='".$fileuploaded."',
category='".$category."',
date='".$date."'";
$result = mysql_query($query);
Comment