Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $value = $_GET['value'];
- $id = $_GET['rowId'] ;
- $columnId = $_GET['columnId'] ;
- if ($columnId=="state"){
- $value=$state;
- } elseif ($columnId=="city"){
- $value=$city;
- } elseif ($columnId=="tehsil"){
- $value=$tehsil;
- } elseif ($columnId=="village"){
- $value=$village;
- } elseif ($columnId=="name"){
- $value=$name;
- } elseif ($columnId=="ward"){
- $value=$ward;
- } elseif ($columnId=="address"){
- $value=$address;
- } elseif ($columnId=="description"){
- $value=$description;
- } elseif ($columnId=="mobile"){
- $value=$mobile;
- }
- //Always accepts update(return posted value)
- mysql_connect("localhost","xxxxxxx","xxxxxxxx") or die("Error: ".mysqlerror());
- mysql_select_db("xxxxxxxxxxxxx");
- $sql = "UPDATE `table`
- SET `state` = '$state',
- `city` = '$city',
- `tehsil` = '$tehsil',
- `village` = '$village',
- `name` = '$name',
- `ward` = '$ward',
- `address` = '$address',
- `description` = '$description',
- `mobile` = '$mobile'
- WHERE `id` = '$id'";
- mysql_query($sql) or die ("Error: ".mysql_error());
- echo "Database updated.";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement