what am i doing wrong??? namebucks reward for help.
Can anyone tell me what I'm doing wrong? I'm trying to install cplinks on a website i'm revamping - spotlightsoccer.com As far as I can tell I followed the installation instructions exactly - http://www.cplinks.com/guide.html - however, when I try to log on or edit in the admin section - http://www.spotlightsoccer.com/admin/ - i get all sorts of errors like these -
SQL/DB Error -- [
Error selecting database spotligh_spotty!
Are you sure it exists?
Are you sure there is a valid database connection?
]
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/spotligh/public_html/includes/mysql.php:99) in /home/spotligh/public_html/admin/index.php on line 69
If anyone can fix this problem and tell me how they fixed it/what i did wrong, I'll give you 40 namebucks.
This is usually the most common problem for an error like this with clients, but did you remember to grant permissions for the user in the DB? I'm assuming you use cPanel because of the username, but I could be wrong. It's the most common oversight of all and that looks to be the issue.
If that doesn't work, verify that the db name, username, and password are all correct.
__________________ Denver Hunter | Customer Service Blog Logically Connected to Idologic, Inc. | Coupon code to save 5%: denver Reseller and Dedicated Web Hosting since 2001 Visit the web's best Christian Forum.
This one is easy, you need to do things in a specific order on the page, and it looks like one of your includes is sending headers before the cookies have been sent.
Use the setcookie() function before you send any headers.
Use the header() function before you send any page text.
I'm not sure it's either of these problems.... I appreciate the thoughts though. If anyone has an idea of how to fix it and wants to do it, I'll pay or something. please pme me.
//Do not show the login form if the admin session exists
session_start();
if ( $_SESSION['logged_in'] == "true" )
{
header ( "location: admin_welcome.php" );
exit;
}