MySQL Forums
Forum List  »  PHP

Re: Please help me with PHP
Posted by: Matjaz Toplisek
Date: August 29, 2005 05:45AM

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";
}
?>

Options: ReplyQuote


Subject
Written By
Posted
August 29, 2005 03:11AM
August 29, 2005 03:19AM
August 29, 2005 05:35AM
Re: Please help me with PHP
August 29, 2005 05:45AM
August 29, 2005 08:13AM
August 30, 2005 10:27PM


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.