here is the code i have but its not actually submitting anything to the database (ive excluded names of db and password for security reasons)
[/code]<?
//initilize PHP
if($_POST['submit']) //If submit is hit
{
//then connect as user
//change user and password to your mySQL name and password
mysql_connect("localhost","******_*****","********");
//select which database you want to edit
mysql_select_db("******_reviews");
//convert all the posts to variables:
$Title = $_POST['Title'];
$Platform = $_POST['Platform'];
$Review = $_POST['Review'];
$Reviewer = $_POST['Reviewer'];
$Rating = $_POST['Rating'];
$Date = $_POST['Date'];
//Insert the values into the correct database with the right fields
//mysql table = database
//table columns = Title, Platform, Review, Reviewer, Rating, Date
//post variables = $Title, $Platform, '$Review, $Reviewer, $Rating, $Date
$result=MYSQL_QUERY("INSERT INTO database (Title,Platform,Review,Reviewer,Rating,Date)".
"VALUES ('$Title', '$Platform', '$Review', '$Reviewer', '$Rating', '$date')");
//confirm
echo "Review uploaded succesfully!";
}
else
{
// close php so we can put in our code
?><title>GameSmart - Write your own game reviews!!</title>
<style type="text/css">
<!--
.style1 {color: #666666}
-->
</style>
<form action="uploadreview.php" method="post" class="style1">
<TABLE>
<TR>
<TD align="center" valign="top">Title
/TD>
<TD><INPUT TYPE='TEXT' NAME='Title' VALUE='' size=60></TD>
</TR>
<TR>
<TD align="center" valign="top">Platform
/TD>
<TD>
<SELECT NAME='Platform'>
<OPTION VALUE='PS2'>PS2
<OPTION VALUE='Gamecube'>Gamecube
<OPTION VALUE='XBOX'>XBOX
<OPTION VALUE='PC'>PC
<OPTION VALUE='GBA'>GBA
</SELECT></TD>
</TR><br>
<TR>
<TD align="center" valign="top">Review
/TD>
<TD><textarea name="Review" cols="60" rows="20"></textarea></TD>
</TR>
<TR>
<TD align="center" valign="top">Rating
/TD>
<TD><input name='Rating' type='TEXT' size=3 maxlength="2">
/10</TD>
</TR>
<TR>
<TD align="center" valign="top">Reviewer
/TD>
<TD><INPUT NAME='Reviewer' TYPE='TEXT' size=60 maxlength="30"></TD>
</TR>
<TR>
<TD align="center" valign="top">Date
/TD>
<TD><INPUT TYPE='text' NAME='Date' VALUE='<? echo date("M.j.y"); ?>' size=60></TD>
</TR>
<TR>
<TD></TD><br>
<TD><INPUT TYPE="submit" name="submit" value="submit"></TD>
</TR>
</TABLE>
</form>
<?
} //close the else statement
?>[/code]
can anybody see whats wrong with this code?