what wrong with my PHP MySQL Update ?
this my php code :
<?
if(isset($_POST['update_judulanime'])){
$jdl_nime = trim($_POST['JDLAN']);
$setID = $_GET['nime_id'];
$queryUPJDL = "UPDATE `anime_completed` SET `judul_anime` = '$jdl_nime' WHERE `anime_completed`.`nime_id` = '".$setID."'";
$exUPJDL = mysql_query($queryUPJDL);
if($exUPJDL){
echo "Success update Judul Anime";
}else{
echo "Error Update".mysql_error();
}
?>
if i push this button, it doesn't execute that query this my html button code :
<button type="submit" name="update_judulanime">Update Title</button>
it just loading but doesn't update the row.. no error reports
Try this.. !!
<?
if(isset($_POST['update_judulanime'])){
$jdl_nime = trim($_POST['JDLAN']);
$setID = $_GET['nime_id'];
$queryUPJDL = "UPDATE `anime_completed` SET `judul_anime` = '$jdl_nime' WHERE `anime_completed`.`nime_id` = '".$setID."'";
$exUPJDL = mysql_query($queryUPJDL);
if($exUPJDL){
echo "Success update Judul Anime";
}else{
echo "Error Update".mysql_error();
}
}
?>
You Haven't Closed if(isset($_POST['update_judulanime'])) {
braces. So it will be showing empty screen or no errors.
Hope this helps.