Jump to content

gsmith

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by gsmith

  1. Sounds to me like your permissions aren't set right. You probably need to chmod the file you're trying to open. You could try a universal chmod 777 first to see if that works, but you'll probably want to tighten the security a little after confirming that's the problem.
  2. I currently have an XML file that I format and display with XSLT. I would like to incorporate some ASP.NET abilities into the displaying of this XML file though. Since I have most of the work already done (with the XSLT file) is there some way to include reference to an .aspx file as well that contains subroutines that could also run on this page?
  3. It was my fault.I forgot to reference one of the earlier variables correctly. I hate those programmer-induced errors - and aren't they all?!
  4. I thought I knew how to do this, but things aren't working. I'm trying to reference a certain value in an array, without knowing ahead of time the exact key. So I've got: $usersname=$_POST["username"];//Find the array pointer for this user$c=1;foreach ($uname as $value) { if ($usersname != $value) { $c++; } else { break; } }print_r($uname[$c]); But it won't print anything at the end! If I hardcode in a value for $c in the print_r statement (put a 2 in there for instance) it works...but it won't work with $c! Any help please?
  5. gsmith

    php hash

    Actually, it turned out to be a slight problem in the file I was storing the usernames and passwords in! Got it solved now though. Thanks for the help!
  6. gsmith

    php hash

    Ok, I used sha1 as the function instead of hash - and it worked.Now I'm having trouble logging on though. Am I correct that if I sha1() the same word/phrase/etc. I'll get the same hexadecimal output every time? I hope that's correct, because then I'm on the right track...I'm also frustrated becuase I don't understand why what I've done isn't working!
  7. gsmith

    php hash

    Is there a version of php and older that doesn't have the hash() function in it?I'm trying to hash passwords using:$pssword=hash('sha1','$_POST["password"]');But it says I'm calling an undefined function when I run it. There's PHP version 4.3.8 on the server I'm working with.
  8. gsmith

    preg_match help

    Thank you! It worked great. W3Schools is where I started learning PHP. I then learned more on my own....now I'm back learning more again! Thank you!
  9. gsmith

    preg_match help

    By non-word you mean a-z, A-Z, and 0-9 would be ok? I want to allow all of those - even if it doesn't spell a real word. I just want to dissallow underscore, space, and any other special characters.Thanks a lot for the help!
  10. gsmith

    preg_match help

    I am creating a page for users to create a username and password. I want the password to only contain the letters a-z, A-Z and/or numbers 0-9. If a user tries to use a special character other than them, I want to return an error message and have them try again. I thought I could do this with preg_match, but I can't seem to get it to work. This is what I've tried so far:if($username != "" || $password != ""){ $pattern="/^[!@#$%^&*_-+= ]*$/"; if (preg_match ($pattern, $username.$password)){ print($chr_err); include($login_page); exit(); }}I then try to create a username and password while purposelly using some of those characters, but I don't get the $chr_err message printed. Any help would be greatly appreciated!
×
×
  • Create New...