also 2 dateien
mysql.php
	
2 datei test.php
	
die tabelle existiert und es hat einträge ich kann auch darauf zugreifen wenn ich es ohne diese mysql.php datei mache.
ah, und hier noch die fehlermeldung:
Parse error: parse error in /home/zimmbi.ch/html/seezer/mysql.php on line 25
Fatal error: Call to undefined function: get() in /home/zimmbi.ch/html/seezer/test.php on line 3
					mysql.php
PHP Code:
	
	
$dbhost = "wwsdfsfe.ch";
$username = "zimfsf";
$userpw = "z5fsdfT";
$dbname = "zimsfsf";
$dbprefix = "zimfsfmbi";
mysql_connect($dbhost,$username,$userpw);
mysql_select_db($dbname);
function add($tabelle, $var, $inhalt)
{
 global $dbprefix;
 $eintragen = mysql_query("INSERT INTO " . $dbprefix . "_" . $tabelle . " (" . $var . ") VALUES (". $inhalt . ")");
}
function delete($tabelle,$id)
{
 global $dbprefix;
 $delete = mysql_query("DELETE FROM " . $dbprefix . "_" . $tabelle . " WHERE id = '" . $id . "'");
}
function get($tabelle, $was, $sonstiges)
{
 global $dbprefix, $result;
 $result = mysql_query("SELECT " . $was . " FROM " . $dbprefix . "_" . $tabelle . " " . $sonstiges);
}
function change($tabelle,$var,$neu,$id)
{
 global $dbprefix;
 $update = mysql_query("UPDATE " . $dbprefix . "_" . $tabelle . " Set " . $var . " = '" . $neu . "' WHERE id = '" . $id . "'");
} 
PHP Code:
	
	
require("mysql.php");
get("users","name","");
while($row = mysql_fetch_object($result))
{
echo $row->name;
} 
ah, und hier noch die fehlermeldung:
Parse error: parse error in /home/zimmbi.ch/html/seezer/mysql.php on line 25
Fatal error: Call to undefined function: get() in /home/zimmbi.ch/html/seezer/test.php on line 3
 
          


Comment