jeg har flg kode
<pre>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>PCO</title>
<link rel="stylesheet" type="text/css" href="pco.css">
</head>
<body>
<? include("head.html") ?>
<table cellspacing="5" cellpadding="5" bgcolor="#000000" height=80% width=100% >
<tr>
<td width=16% height=100><? include("menu.html") ?></td>
<td width=84% height=100>
<center>
<table>
<?
$bgc1="#00FFFF";
$bgc2="#00FF00";
$az = $_GET["az"];
//line 22 echo("$az<br>");
//line 23
mysql_connect ("localhost","zzaazz","*********");
//line 25 // mysql_connect ("localhost","zzaazz","*****") or die(mysql_error());
mysql_select_db ("test");
//include ("mysql.php");
$foresp = mysql_query("SELECT * FROM people ORDER BY titel ASC limit 0,15");
while ($data = mysql_fetch_array($foresp))
{
if($data[1]=="0")
{
$color=$bgc2;
}
elseif($data[1]=="3")
{
$color=$bgc1;
}
echo("<tr><td bgcolor='$color'>$data[2]</td></tr>");
}
?>
</table>
</center>
</td>
</tr>
</table>
<? include("copy.html") ?>
</body>
</html>
</pre>
jeg får flg fejl
Warning: mysql_connect(): Access denied for user: 'zzaazz@localhost' (Using
password: YES) in c:\\programmer\\apache group\\apache\\htdocs\\pco\\staff.php
on line 24
når jeg fjerne connect viser den resultatererne uden fejl
jeg har prøvet flg.
ændre koden til
<pre>
<?
mysql_connect ("localhost","zzaaazz","**********************");
mysql_select_db ("bah", $mysql_connect);
?>
</pre>
fik jeg flg. fejl
Warning: mysql_connect(): Access denied for user: 'zzaazz@localhost' (Using
password: YES) in c:programmerapache groupapachehtdocspcostaff.php
on line 24
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource
in c:programmerapache groupapachehtdocspcostaff.php on line 25
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in c:programmerapache groupapachehtdocspcostaff.php on line
29
ændre koden til
mysql_connect ("localhost","zzaaazz","**********************")or
die(mysql_error());
mysql_select_db ("bah", $mysql_connect);
der skette ikke noget, inge fejl, inge resultater
sættter disse dataer ind i en fil og så inkludere den når der skulle contactes databasen
så sagde den at der var fejl i denne line
while ($data = mysql_fetch_array($foresp)) ----- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\\programmer\\apachegroup\\apache\\htdocs\\pco\\staff.php on line 31
nogen der kan hjælpe
her er indholde af min my.ini setup felt i mysql admin
<pre>
#This File was made using the WinMySQLAdmin 1.4 Tool
#28-10-2003 22:11:07
#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions
[mysqld]
basedir=C:/mysql
#bind-address=169.254.91.33
datadir=C:/mysql/data
#language=C:/mysql/share/danish
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=zzaazz
password=***********
</pre>
se også
http://thomasc.users.whitehat.dk/irc/irc2.JPGPå forhånd tak
mvh.
Thomas Christensen
-------------------------------------------------------
Visual Basic noget for dig?
tjek Visual Basic-Gruppen
http://www.udvikleren.dk/groups/?gid=41