Silhouette Posted January 28, 2008 Share Posted January 28, 2008 Hey All I was wondering if someone might be able to help me out. Im new to the whole php and mysql world so the problem may even be something im doing wrong. I downloaded the MyInvoice Php billing script, made the necessary adjustments and uploaded the files. When i try run the script however i recieve the following: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/sc/public_html/billing/login.php on line 6 Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sc/public_html/billing/login.php on line 30 Warning: Cannot modify header information - headers already sent by (output started at /home/sc/public_html/billing/login.php:6) in /home/sc/public_html/billing/login.php on line 33 The coding for the login.php is this: <? include("inc/config.php"); $connection = mysql_connect($hostname, $user, $pass) or die ("Unable to connect!"); $query = "SELECT * FROM clients WHERE name = '$name' AND password = PASSWORD('$password')"; $result = mysql_db_query($database, $query, $connection); if (mysql_num_rows($result) == 1) { session_start(); session_register("client_id"); session_register("client_name"); session_register("client_email"); session_register("client_ref"); session_register("client_title"); list($clientid, $name, $pass, $email, $ref, $title) = mysql_fetch_row($result); $client_id = $clientid; $client_name = $name; $client_email = $email; $client_ref = $ref; $client_title = $title; header("Location: menu.php"); mysql_free_result ($result); mysql_close($connection); } else { mysql_free_result ($result); mysql_close($connection); header("Location: index.htm"); exit; } ?> Help would be much appreciated. Thanx alot Silhouette Quote Link to comment https://forums.phpfreaks.com/topic/88179-myinvoice-php-script-problems/ Share on other sites More sharing options...
trq Posted January 28, 2008 Share Posted January 28, 2008 I would suggest finding a different solution. Alot of the code in that simple snippet is depricated as well as pretty poorly programmed to begin with. Quote Link to comment https://forums.phpfreaks.com/topic/88179-myinvoice-php-script-problems/#findComment-451142 Share on other sites More sharing options...
Silhouette Posted January 28, 2008 Author Share Posted January 28, 2008 Any idea where i can get another free invoicing script from? Quote Link to comment https://forums.phpfreaks.com/topic/88179-myinvoice-php-script-problems/#findComment-451420 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.