Monday, 22 February 2016

How to update record by getting  id from url you


How to update record by gettingvid from Url ?
Following steps are required
1. your url should contain id that you can add
by using ? after address like test.php?
2.For getting id you have get id by making variable $id=$_GET[id];
3.In update query you have to write this
$que="UPDATE admin SET image =  '$file_name' WHERE  id ='$id'";
4.when you are getting the id from update url make sure that your form action should echo id in url like this
<form action="test.php?id=<?php echo $id ?>" >
5.its simple and easiest way to get id from url and update id

No comments: