Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>asdf</title>
- <link rel="stylesheet" type="text/css" href="Background.css">
- </head>
- <?php
- session_start();
- if(!isset($_SESSION["login"]))
- header("location:admin.php");
- ?>
- <body>
- <h1 style="color:white"><u><center></center></u></h1>
- <div id="BG"></div>
- <form action = "update1.php" method = "GET">
- <table border = 0>
- <tr>
- <td>Image: <input type = "text" name = "image" id = "image"></td>
- <br/>
- <td>Hero Name: <input type = "text" name = "heroes" id = "heroes"></td>
- <br/>
- <td>Role: <input type = "text" name = "roles" id = "roles"></td>
- <br/>
- <td>Attribute: <input type = "text" name = "attribute" id = "attribute"></td>
- <br/>
- <td>Description: <input type = "text" name = "description" id = "description"></td>
- <br/>
- <td>General: <input type = "text" name = "general" id = "general"></td>
- <br/>
- </tr>
- </table>
- </br>
- <input type = "submit" name="update" value = "Update">
- </form>
- </center>
- </html>
- <?php
- ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
- define("DB_USER","*****");
- define("DB_PASSWORD","****");
- define("DB_HOST","*****");
- define("DB_NAME","*****");
- $dbc=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
- if(isset($_GET['update']))
- {
- $image = $_GET['image'];
- $heroes = $_GET['heroes'];
- $roles = $_GET['roles'];
- $attribute = $_GET['attribute'];
- $description = $_GET['description'];
- $general = $_GET['general'];
- $sql = "update `Dota 2 select` set (`image` = '$image',`heroes` = '$heroes') WHERE (heroes= '$heroes', image = '$image')";
- // $sql = "Update `Dota 2 select` SET (`image`= [$image]) = WHERE `image`)";
- // $sql = "Update `Dota 2 select` SET (`image`= [$image],`heroes` =[$heroes],`roles` =[$roles],`attribute`=[$attribute],`description`=[$description],`general`=[$general]) = WHERE `heroes`='$heroes')";
- // $sql = "Update `Dota 2 select` SET (`image`= [$image],`heroes`,`roles`,`attribute`,`description`,`general`) = WHERE (`image`,`heroes`,`roles`,`attribute`,`description`,`general`) = ('$image','$heroes','$roles','$attribute','$description','$general')";
- if(!mysqli_query($dbc, $sql))
- {
- echo(mysqli_error($dbc));
- }
- else
- {
- echo 'Data successfully updated!';
- }
- mysqli_close($dbc);
- }
- ?>
- <?php
- define("DB_USER","********");
- define("DB_PASSWORD","********");
- define("DB_HOST","*********");
- define("DB_NAME","*********");
- $dbc=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
- $Heroes = $_GET['Heroes'];
- if( isset($_GET['Heroes']) )
- {
- $sql= "update into `Dota 2 select` WHERE `Heroes`='$Heroes'";
- if(!mysqli_query($dbc, $sql))
- {
- echo(mysqli_error($dbc));
- }
- else
- {
- echo 'Data successfully updated!';
- echo "<meta http-equiv='refresh' content='0;url=adminupdate.php'>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement