Thread: HTML to access a database

HTML to access a database

From
"Evan Panagiotopoulos"
Date:
I created a database with a table and I am interested to learn how to
access it from a web page. Since I am a novice I would like to see an
example or two of that.

Can you recommend any online tutorials? I fount many tutorials on sql
and configuring postgresql but I would like to see how to access the
database with html.

I have been learning php and I do know a little of perl.

Thanks,

Evan


Re: [personal] HTML to access a database

From
papapep
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Evan Panagiotopoulos wrote:
| I created a database with a table and I am interested to learn how to
| access it from a web page. Since I am a novice I would like to see an
| example or two of that.

How about taking a look at the phppgadmin code? I think it should be
helpfull for you.

Josep Sànchez
[papapep]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/k74z2vx52x0kyz4RAkX6AJwLYsW8snkq/seV6e9nyoV7mc2CVgCfeELA
E0OdH1PUDz1OA7eHEC1nJ+E=
=9Bpa
-----END PGP SIGNATURE-----




Re: [personal] HTML to access a database

From
Bruno LEVEQUE
Date:
Here is an example of php and postgres
Sorry there is code before and after :


[...]
$conn=pg_connect("host=localhost user=USER dbname=DB");
if (!$conn) {
   echo "An error occurs.<BR>";
   exit;
}

$query="SET DATESTYLE TO PostgreSQL,European";
# execution of a query
pg_query($conn, $query);

$query="SELECT * from agenda where date = '" . $MaDate . "'";
$result = pg_query($conn, $query)

if (!$result) {
   echo "An error occurs. - " . $cas . " + " . $UneDate .
         " + " . $Donnees[0] . ":0:0<BR>";
   exit;
}
foreach (pg_fetch_all($result) as $value)
{
   $libDest = "Text " . $value[NAMEOFCOL1];
   $libSrc =  "TExt $value[NAMEOFCOL2]";
}

[...]

With this you take a minimum of knowledge of php/postgres

Bruno

papapep wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Evan Panagiotopoulos wrote:
> | I created a database with a table and I am interested to learn how to
> | access it from a web page. Since I am a novice I would like to see an
> | example or two of that.
>
> How about taking a look at the phppgadmin code? I think it should be
> helpfull for you.
>
> Josep Sànchez
> [papapep]
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE/k74z2vx52x0kyz4RAkX6AJwLYsW8snkq/seV6e9nyoV7mc2CVgCfeELA
> E0OdH1PUDz1OA7eHEC1nJ+E=
> =9Bpa
> -----END PGP SIGNATURE-----
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque@net6d.com
http://www.net6d.com