Dat
11-18-2007, 08:08 PM
I've gone through it 100 times and I can't seem to find the error, and I've worked with php for a very long time, I'm sure anyone can find the error in my sick state.
I updated my form and now it will not update...
if($_POST['edit_submit']) {
$id = $_POST['id'];
$type = escape_data( $_POST['type'] );
$title = escape_data( $_POST['title'] );
$titlejap = escape_data( $_POST['japtitle'] );
$image= escape_data( $_POST['image'] );
$genres = escape_data( $_POST['genres'] );
$formats = escape_data( $_POST['formats'] );
$episode_number = escape_data( $_POST['episode_number'] );
$length = escape_data( $_POST['length'] );
$year = escape_data( $_POST['year'] );
$opening = escape_data( $_POST['opening'] );
$ending = escape_data( $_POST['ending'] );
$summary = escape_data( $_POST['summary'] );
$episode = escape_data( $_POST['episode'] );
$review = escape_data( $_POST['review'] );
$s_author = escape_data( $_POST['s_author'] );
$r_author = escape_data( $_POST['r_author'] );
$last_updated = date("Y-m-d");
//Check if any fields are empty or not
if((empty($title)) OR (empty($summary))) {
echo "<center><b>Please fill in all required fields!</b></center>";
} else {
//The MySQL query which will update the content in the table.
$query = "UPDATE anime_reviews SET title = '$title', title_jap = '$titlejap', image = '$image', genres = '$genres', formats = '$formats', episode_number = '$episode_number', length = '$length', released = '$year', opening_t = '$opening', ending_t = '$ending', summary = '$summary', review = '$review', s_author = '$s_author', r_author = '$r_author', episodes = '$episode', last_updated = '$last_updated', type = '$type' WHERE id = '$id'";
//Execute the query.
$result = mysql_query($query) or die(mysql_error());
echo '<meta http-equiv="Refresh" content="10; URL=/" />The entry has been edited, please wait a few seconds (3) while I redirect you.<br> if not then click <a href="/">here!</a>';
}
I updated my form and now it will not update...
if($_POST['edit_submit']) {
$id = $_POST['id'];
$type = escape_data( $_POST['type'] );
$title = escape_data( $_POST['title'] );
$titlejap = escape_data( $_POST['japtitle'] );
$image= escape_data( $_POST['image'] );
$genres = escape_data( $_POST['genres'] );
$formats = escape_data( $_POST['formats'] );
$episode_number = escape_data( $_POST['episode_number'] );
$length = escape_data( $_POST['length'] );
$year = escape_data( $_POST['year'] );
$opening = escape_data( $_POST['opening'] );
$ending = escape_data( $_POST['ending'] );
$summary = escape_data( $_POST['summary'] );
$episode = escape_data( $_POST['episode'] );
$review = escape_data( $_POST['review'] );
$s_author = escape_data( $_POST['s_author'] );
$r_author = escape_data( $_POST['r_author'] );
$last_updated = date("Y-m-d");
//Check if any fields are empty or not
if((empty($title)) OR (empty($summary))) {
echo "<center><b>Please fill in all required fields!</b></center>";
} else {
//The MySQL query which will update the content in the table.
$query = "UPDATE anime_reviews SET title = '$title', title_jap = '$titlejap', image = '$image', genres = '$genres', formats = '$formats', episode_number = '$episode_number', length = '$length', released = '$year', opening_t = '$opening', ending_t = '$ending', summary = '$summary', review = '$review', s_author = '$s_author', r_author = '$r_author', episodes = '$episode', last_updated = '$last_updated', type = '$type' WHERE id = '$id'";
//Execute the query.
$result = mysql_query($query) or die(mysql_error());
echo '<meta http-equiv="Refresh" content="10; URL=/" />The entry has been edited, please wait a few seconds (3) while I redirect you.<br> if not then click <a href="/">here!</a>';
}