<?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 .

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.