I am using godaddy server. After installing SSL in my primary domain I used .htaccess
file to redirect page. but suddenly I can't fetch data from database anymore (which was working fine for past 6 months) and the same problem happened with my add-on domains also. What I contacted godaddy they said it's due to .htaccess file. I renamed .htaccess
file to .htaccess.bak
in both primary and add on domains but I'm still getting the same issue. My .htaccess
code is:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]`
and my php code is
if($_GET[log]==in)
{
$username=$_POST['username'];
$password=$_POST['password'];
$tmpuser= "SELECT * FROM `emplog` WHERE username='$username'";
$q1=$con->query($tmpuser);
$count1=$q1->num_rows;
}
However when I tested the database connection, it says "connection established successfully". but $count1
is returning null value. (Username and password is returning according to database values. The same as was returned for last 6 months. I checked with the database and found that I am giving the correct value.)
Please help to to solve this problem.