Jump to content

john010117

Members
  • Posts

    492
  • Joined

  • Last visited

    Never

Everything posted by john010117

  1. If I get what you mean, put the form(s) and the PHP processing script in a same file (like I do for my admin panel). So, in the PHP script, check to make sure that the form was submitted before processing it.
  2. Use htmlentities() when filtering the user input.
  3. No error messages for the most part. It works fine.
  4. Right after submitting the registration form: No e-mail. You could improve the page layout ALOT.
  5. Right. Man, I learn something new everyday (in this case, readfile() ). Thanks to both of you. I'll post again if I have any questions.
  6. You have a nice sense of humor. But don't look at me. I didn't submit that.
  7. return You can use variables after that.
  8. 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; } ?>
  9. ... 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 } ?>
  10. That's the biggest possibility. If you don't want the hassle of turning on php every time you start your PC, just set it to automatically start every time you start your computer.
  11. 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?
  12. You could get started here. I'm glad that you're switching over to CSS.
  13. Do you mean physically print it, or save the data somewhere?
  14. You should have posted this in PHP help. If you look at the descriptions on the front page, you'll know where to post.
  15. Right. I understand what you mean. I've seen several forums not have mods at all because they're afraid of the time when it's time to upgrade.
  16. Use CSS instead of HTML tables... it's what I just said.
  17. 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.
  18. Fine. One link (pictures) doesn't work. PS: I'm glad that you've accepted my quote submission (by Albert Einstein).
  19. Put error_reporting(E_ALL); at the very top of your script (after session_start()), and see what it produces.
  20. For one, you can get started on mysql_real_escape_string(). But make sure to implement other features.
  21. All you need is mail(). But be make sure to add tons of security features, so there won't be any spammers.
×
×
  • 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.