Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Edycja</title>
- </head>
- <body>
- <h1> Edycja danych</h1>
- <?php
- $id2=$_POST['id2'];
- $im2=$_POST['im2'];
- $na2=$_POST['na2'];
- $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='$im2', nazwisko='$na2'
- where id_kilenta='$id2';";
- $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=index.php method=post>
- <input type=submit name=Ok value=OK>
- </form>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement