Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Edycja</title>
- </head>
- <body>
- <h1> TEST </h1>
- <?php
- $idos2 = $_POST['id2'];
- $imie2 = $_POST['imie2'];
- $nazw2 = $_POST['nazw2'];
- $dbname = postgres;
- $user = postgres;
- $pass = retro2retro;
- $dbh = pg_connect("dbname=$dbname user=$user
- password=$pass host=localhost") or die("Nie moge
- polaczyc sie z baza danych !");
- $query = "UPDATE klient SET imie='$imie2', nazwisko='$nazw2',
- where id_kilenta= $idos2";
- $wynik = pg_query($query);
- // sprawdzmy ile wierszy podmieniono
- $lz = pg_affected_rows($wynik);
- echo " Edytowano $lz osob <br /> \n";
- }
- pg_close($dbh);
- // zapewnijmy powrot do strony poprzedniej
- echo "<form action=testdb.php method=post>
- <input type=submit name=Ok value=OK>
- </form>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement