PHP help - first timer
Table called links contains the following:
+----+--------+--------------------------------+---------+ | id | author | link | caption | +----+--------+--------------------------------+---------+ | 1 | Me | http://www.google.com/ig?hl=en | Google | +----+--------+--------------------------------+---------+ PHP Code: Code:
<div id=body> <br> Thanks in advance, vxc |
It looks like you might have a problem with:
Code:
$mylinks = @mylinkssql_query("SELECT link, caption FROM links WHERE author='Me'"); |
Quote:
I've changed my previous post. Sorry about that. Anyway, problem still not solved. Could it be some kind of configuration error. I've got the default ubuntu php4 installation. Haven't changed php.ini Thanks again, vxc |
Does even "My Links:" show up? Try (temporarily) removing the error-supressing @ in front of each function call to see if that sheds any light on things.
|
My Links doesn't show up. Removing the @ sign gives this error:
Fatal error: Call to undefined function: mysql_connect() in /var/www/test.php on line 4 Line 4 is: $dbcnx = mysql_connect('localhost', 'root', 'test'); I Googled the error and I think found the problem. According to phpinfo(): Code:
Configure Command '../configure' '--prefix=/usr' In order to enable it I installed php4-mysql from the ubuntu repositories and presto it worked. Thanks for the help Matir! Problem solved! :) vxc |
No problem, glad we were able to get it working! In the future, I suggest avoiding error supression (@function) while debugging. They can help sometimes. :)
|
All times are GMT -5. The time now is 11:05 AM. |