Jump to content

john010117

Members
  • Posts

    492
  • Joined

  • Last visited

    Never

Posts posted by john010117

  1. Right after submitting the registration form:

     

    Warning: mail() [function.mail]: Safety Restriction in effect. The mail() command is not allowed, contact the admin. in /www/110mb.com/b/l/o/k/d/u/d/e/blokdudez/htdocs/register.php on line 66

    User Created Succesfully!

    Please check your email for temporary password

     

    No e-mail. You could improve the page layout ALOT.

  2. Hey anything you for. And to whoever submitted, "I'm sexy." While I must agree with you, I didn't think site visitors would really appreciate it. Sorry.

     

    You have a nice sense of humor. But don't look at me. I didn't submit that.

  3. First, you'll want to know if the username and password they've provided matches against the records in the database. After doing that, you start a session (name based on their user_id or whatever).

    Ex:

    <?php
    session_start();
    $username = $_POST['username'];
    $password = $_POST['password'];
    // Assuming that you have hashed the password in the database
    $hashed_pass = md5($password);
    // Check it against the database
    $query = mysql_query("SELECT * FROM users WHERE username = '$username' AND password = '$hashed_pass'") OR DIE (mysql_error());
    // If they match, start a session
    if(mysql_num_rows($query)>0) {
       while($row = mysql_fetch_assoc($query);
          extract($row);
          // Assuming that you have a unique id number for each user (named user_id)
          $_SESSION['uid'] = $user_id;
       }
    }
    else {
       return false;
    }
    ?>
    

     

     

     

  4. ... but it's not reliable, as stated in the manual. Try using sessions instead.

     

    First page:

    <?php
    session_start();
    $_SESSION['page_refer'] = $_SERVER['PHP_SELF'];
    ?>
    

     

    Second page:

    <?php
    session_start();
    if(!isset($_SESSION['page_refer'])) {
       return false;
    }
    else {
       //continue with your code
    }
    ?>
    

  5. I have a quick question.

     

    I don't want my users to know the full path to a file that they're downloading. I instead want to display them as "download.php?file=whatever.zip", and let users download it when they click that link. How would I go about doing that? I know a database is involved (to store the full path to a file), but how would I let them download it when they visit that link?

  6. One thing that I say to everyone nowadays is: Do not use HTML tables for a layout!!! Use CSS. With CSS, you could make your design way better. But ultimately, it's your choice. I just hope you make a good choice.

  7. Half? Only one doesn't work, and that's the picture on. Of course there are only four, so one is pretty much half of them. But half sounds so harsh, I prefer one.  ;)

     

    Fine. One link (pictures) doesn't work.

     

    PS: I'm glad that you've accepted my quote submission (by Albert Einstein).  ;)

×
×
  • 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.