Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <style>
- .error {color: #FF0000;}
- </style>
- </head>
- <body>
- <?php
- $host = "localhost";
- $user = "joe";
- $pass = "joe";
- $db = "testdb";
- $con = pg_connect("host=$host dbname=$db user=$user password=$pass")
- or die("Could not connect to server\n");
- $query = "SELECT * FROM playground LIMIT 1";
- $rs = pg_query($con, $query) or die("Cannot execute query: $query\n");
- while ($ro = pg_fetch_object($rs)) {
- echo 'ID:'. '<input type="text" value="' . $ro->id . '" />'."\n";
- echo 'NOMBRE:' . '<input type="text" value="' . $ro->name . '" />'."\n";
- echo 'PRECIO' . '<input type="text" value="' . $ro->decimal . '" />'."\n";
- echo "\n";
- }
- pg_close($con);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement