i want a private messaging system using php and mysql...someone plz help

Yeah. We don't do your work for you. You can hire some of us for a lot of $$ to do it if you want, or you can make an effort, post your code and errors here, and we may decide to help you.

P.S. MySQL - easy to use. PHP - easy to use incorrectly, but not simple if you want to do it correctly. Consider it C++ for web servers, and program it accordingly.

ok let's just forget about that ..now i'm having another problem...my xamp server was working fine but now whenever i try to run any program now it gives mysql_num_rows() expects parameter 1 to be resource, boolean given...it was working fine and the condition are not false as well...all the program used to run correctly but now i don't know what happened....do i need to reinstall my xamp server??

Member Avatar for diafol

Do you think that showing your code may help? Mysql functions are deprecated and have been removed in php. That's not the problem here though.

it was working fine and i haven't changed anything in the code..now it gives that error in every program....if you still want to see the code then i can show you....but it was working earlier...

Member Avatar for diafol

How do you expect us to help you unless you show your code? Crystal balls and all that...

I agree you are hiding too much. How about one thing. Did you open a SQL command line and see if the server is running?

PHP no longer supports MySQL APIs. It has been using MySQLi APIs for years. Most all calls need the resource identifier returned when you open the database. Anyway, as others have said, show your code. Until you do we can't help you any further.

this is login page code....the sql error is in each page

<?php

session_start();
ob_start();

include "config.php";

$error = '';

if(isset($_POST["submitted"]) && $_POST["submitted"] == "yes")
{
    $username = trim(strip_tags($_POST['username']));
    $user_password = trim(strip_tags($_POST['passwd']));
    $encrypted_md5_password = md5($user_password);

    $validate_user_information = mysql_query("select * from `userinfo` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($encrypted_md5_password)."'");

    if($username == "" || $user_password == "")
    {
        $error = '<br><div class="info">Sorry, all fields are required to log into your account. Thanks.</div><br>';
    }
    elseif(mysql_num_rows($validate_user_information) == 1) 
    {

        $get_user_information = mysql_fetch_array($validate_user_information);
        $_SESSION["VALID_USER_ID"] = $username;
        $_SESSION["USER_FULLNAME"] = strip_tags($get_user_information["fullname"]);
        header("location: profile.php?page_owner=".base64_encode($username));
    }
    else
    {
        $error = '<br><div class="info">Sorry, you have provided incorrect information. Please enter correct user information to proceed. Thanks.</div><br>';
    }

}
?>

`

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.