Re: Please help me with PHP
I have 3 files:
text.php, povezava.php and funkcije.php
povezava.php
<?
/* Zugangsdaten zum Verbinden mit dem MySQL-Server */
$dbh=mysql_connect ("localhost", "myusername", "my password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("toplisek_podjetje");
?>
funkcije.php
<?
/* Funkcije za preprost podatkovni vmesnik */
error_reporting(0);
function send_sql($db, $sql)
{
if (! $res=mysql_db_query($db, $sql))
{
echo mysql_error();
exit;
}
return $res;
}
?>
and test.php, which I would like to test:
<?
include ("funkcije.php");
include ("povezava.php");
$sql="...SQL-ukaz...";
if ($res=send_sql ($db, $sql))
{
echo "SQL-was performed";
}
?>
Subject
Written By
Posted
Re: Please help me with PHP
August 29, 2005 05:45AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.