Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body><?php session_start();
- require_once "config.php";
- $connect = @new mysqli($host, $db_user, $db_password, $db_name);
- if ($connect->connect_errno!=0)
- {
- echo "Error: ".$connect->connect_errno;
- mysql_query('SET NAMES utf8');
- mysql_query('SET CHARACTER_SET utf8_general_ci');
- }?>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- </head>
- <form method="get" action="">
- BAZA<input type="text" name="baza"/>
- CO<input type="text" name="co"/>
- GDZIE
- <input type="text" name="warunek"/>
- <input type="submit">
- </form>
- UPDATE nazwa_bazy SET atrybut='wartosc' WHERE warunek='wartosc'")
- <pre>
- <?php
- if (isset($_get) && empty($_POST) == false){
- $baza = $_get['baza'];
- $co = $_get['co'];
- $warunek = $_get['warunek'];
- mysqli_query($connect,"UPDATE $baza SET $co WHERE $warunek");
- var_dump($_POST);
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment