Jump to content

john010117

Members
  • Posts

    492
  • Joined

  • Last visited

    Never

Posts posted by john010117

  1. Since I don't know the structure of your forum, I can't quite say. But the basic idea would be to have a column in your users and/or sessions table named $logged_in, and the only values would be 1 for true and 0 for false. Then, run a mysql_query on the table WHERE logged_in = 1.

  2. <?php
    include("config.php");
    mysql_connect($db_host, $db_user, $db_pwd);
    mysql_select_db($db_name);
    if (!$_POST) {
      include("form.php");
    } else {
    $formbody = $_POST['formbody'];
    
    $sql = "SELECT $db_usernamefield, $db_emailfield FROM $db_table";
    $result = mysql_query($sql);
    
    while($row = mysql_fetch_array($result)){
    $username = $row['username'];
    $email = $row['email'];
    
    $body = "$formbody";
    $body = str_replace("[username]", $username, $body);
    mail($email, $emailsubject, $body, "From: $fromname <$fromemail>");
    if(mail ($email, $emailsubject, $body, "From: $fromname <$fromemail>"))
    echo "Messages sent";
    }
    }
    
    ?>
    

  3. I don't know if this will help, but try changing the mysql_query to look for both the username AND the password. If it didn't find a match (using mysql_num_rows), return false. Otherwise, return true.

     

    Here's the query:

    $check = mysql_query("SELECT * FROM users WHERE username = '$username' AND password = '$password'")or die(mysql_error());
    

  4. Caution - this could happen to you.

     

    PS - no, this is not a project design that I worked on  :o

     

    Similar to utube.com. How are liveleak and utube able to get them videos?

     

    I believe you have to know a bit of flash to make that.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.