I can’t understand why i get supplied argument is not a valid?
My codes belove
dbconnect.class.php http://ideone.com/AILC9
getdata.class.php http://ideone.com/wIbL3
header.class.php http://ideone.com/OQSg9
index.php
http://ideone.com/Zp6sF
When I run index.php I can get this codes:
<html>
<head>
<title> <br />
<b>Warning</b>: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in <b>C:\AppServ\www\ilk\class\getdata.class.php</b> on line <b>21</b><br />
</title>
<meta name="description" content="<br />
<b>Warning</b>: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in <b>C:\AppServ\www\ilk\class\getdata.class.php</b> on line <b>21</b><br />
" />
<meta name="keywords" content="<br />
<b>Warning</b>: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in <b>C:\AppServ\www\ilk\class\getdata.class.php</b> on line <b>21</b><br />
" />
</head>
</html>
Something is failing with your mysql connection/query.
echo mysql_error()after each call to header to reveal the errors.Also in your
sayfaHeader()method, the last 2 lines will never be executed because you have 2 returns, once youreturnfunction execution ends.