Hi,
I have created a blog and having a problem in managing the blogs where the user can delete their blogs. I want that if a person logs in, he or she should be able to see only their blogs. For this I am have made the blog table in which the session variable is inserted and have done it successfully. Now I am trying to get the blogs of the person who has logged in. For this I am using the following query:
if (isset($_SESSION['MM_Username'])) {
$colname_rec_manage_blog = $_SESSION['MM_Username'];
}
mysql_select_db($database_con_reg, $con_reg);
$query_rec_manage_blog = sprintf("SELECT * FROM blog WHERE email.blog = %s", GetSQLValueString($colname_rec_manage_blog, "text"));
$query_limit_rec_manage_blog = sprintf("%s LIMIT %d, %d", $query_rec_manage_blog, $startRow_rec_manage_blog, $maxRows_rec_manage_blog);
$rec_manage_blog = mysql_query($query_limit_rec_manage_blog, $con_reg) or die(mysql_error());
$row_rec_manage_blog = mysql_fetch_assoc($rec_manage_blog);
With this code I am trying to fetch the data of the data of a person whose session variable "MM_Username" is active. Please note that the session variable "MM_Username" contains the email address which should be the login of a user.
Now this code does not give me any error and if I echo the session variable it gives me the email address as well. But it does not give me any records at the end.
Can anyone please help me in this matter. I am stuck up for quite a bit of time, any help will be highly appreciated.
Regards,
Bilal A. Khan