Jump to content

PigsHidePies

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PigsHidePies's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks daniel0...sha1() hashes are actually 40 characters long. I am not going to be using this short hash for a password, rather just a random 8 char string for a simple task. Thanks for the help.
  2. Hello, I was wondering if there was a way to limit the output of md5()..say for instance I don't want 32 characters and instead only want 8...how would I limit how many chars md5 outputs? Thanks
  3. Thanks for the help, I used a char field of 24 chars and saved it in date('F jS Y') format...out of curiousity..why should it be 255 chars long?
  4. Can I use the basic date() function and just put the value in a mysql database? I read that php and mysql interpret dates differently...also, how many chars should the database be...8? Thanks for any help
  5. I don't have an account at myspace. I hate the idea behind it.  If people want a blog..get a free blog..if people want to message friends..download any of a variety of IM clients...I see no real advantage to signing up.
  6. EDIT: I got it to work using your suggestion, gerkintrigg, thanks. Genericnumber1, you said the code wasn't secure about that which you wrote easlier...could you(or someone) please explain how it isn't secure? Is it possible for someone to edit the cookie and insert malicious code? What if I used a mysqli_real_escape string on the variable $username? Thanks
  7. Overall nice job on the site. I do have a few recommendations though: 1.Get rid of the 'Home' page link on the home page, it isn't needed. 2.Lose the flash. Some people can't view flash due to their OS choice(like me). It not only isnt neccessary but slows the loading of the site as well. 3.Your legal disclaimer at the bottom right of your home page changes width and color upon rollover though it remains the same on every other page. Same goes for the general links on the homepage compared to the rest of your site.Links should all behave the same. 4. Your tabbed browsing is decent but I would lose the gray border above the top upon rollover. Good luck with the redesign
  8. lol great profile page...i cant really help ya...more out of fear from alonzo than anything else..good luck dude
  9. How does one go about displaying all rows within a table based upon a userid? Say for example, a profile page of a site member. How would I display various information collected in a table based upon a cookie? Heres some code to help clarify(it is not complete and probably wrong ): [code]<?php $username=$_SESSION['valid_user']; //setup connection @ $db = new mysqli('localhost', 'username', 'password', 'database'); if (mysqli_connect_errno()) { echo 'Error: Cannot connect to database.'; exit; } $query = "select username, email from database"; $result=$db->query($query); while($row = mysqli_fetch_assoc($result)){     echo $row['username'];     echo $row['email']; } [/code]
  10. I recommend register_globals=off,  use sessions and by default it will use cookies or if need be, a URL with the SID in it but basically it is much more secure than having the username/password sent over the URL in plain text. I recommend avoiding that at all costs. The difference between the two types of variable retrieval is that POST does not go over the URL wheras GET does. Generally it is more widely used for sensitive information. GET is good for things that aren't that important/can't cause that much damage. If you are dealing with mysql queries that insert or delete things you should generally use POST, if you are only retrieving information to be displayed GET might be aceptable to use.
  11. Yea, its possible to do it on the same page, just have to put the form and the variables above the actual php code else you'll get an error since the user hasn't given any info yet. I recommend you start a session at the top of all your pages since you are going to be using sessions. That way, if someone is already logged in, you can have the page display somtehing else besides letting him signup again. ex: <?php session_start(); ?> <html> etc </html>
  12. It works, brilliant. Thanks a lot mate.
  13. Will this let me still validate a user? Im a little confused about the whole header(Locaton:) function. Does this have to go at the very top of the page and if so how can I validate a user if it redirects before the validaton process occurs?
  14. I'm sure this has been asked before but I couldnt find it within the search results so here it is: How do I, after successfully logging a user in, redirect her to a new page? I would want the page to be a default location (like a member home page) where all logged in users go to first and those that aren't logged in are directed toward the default login page. I would think this would be a standard operation but all the searches I've done on google have come up with very little regarding this, hopefully one of you can solve this for me, many thanks.
×
×
  • 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.