<?php
include('connect.php');
$upid=$_POST['id'];
$upname=$_POST['categoryname'];
$updesc=$_POST['description'];
$newupid=mysql_query("update tbl_category set categoryname='$upname', description='$updesc' where id='$upid'")or die(mysql_error());
echo "<script type='text/javascript'> alert('Updated Successfully'); window.location.href='view.php';</script>";
?>
This is updated code. It works successfully. but I want to show alert box "Nothing can be updated" if no changes made. And it should have the same .