Jump to content

dptr1988

Members
  • Posts

    372
  • Joined

  • Last visited

    Never

About dptr1988

  • Birthday 08/01/1988

Contact Methods

  • Website URL
    http://www.phpcodinghelp.com

Profile Information

  • Gender
    Male

dptr1988's Achievements

Member

Member (2/5)

0

Reputation

  1. Ok, I have a copy of this script installed at 'http://www.phpcodinghelp.com/dev/login_system/login.php'. It is using the mysql database backend and all of the users that are in the array in the 'db_array' function have been added to the database. Note: only user 'harry' has the required permission 'd' that is needed to access the page. All the other can just login. Username: 'harry' Password: 'asdf' Other username/password pairs without the needed permissions: joe_sample/password john_sample/password test/test_password Username and password hashes provided for your convienience. The are the password hashes from the database. joe_sample/f6b363d47c1ff60c67eb121d6fb101c5 john_sample/f6b363d47c1ff60c67eb121d6fb101c5 harry/434e2ffa425d98d9682d2cef6a4a0a10 test/32e0b42b8a18365e9975b402a5d9d150 Expected behaviour: If you are not logged in, you will be presented with the login form. If you have posted incorrect values in the login form, you will be given an error message and the login form again. If you successfully login and have the required permissions, you should see this message: "You are now in a protected page, logged in as X and have the required permission 'Y' ", where 'X' is replaced with the username, and 'Y' with the permission that the page requires. If you select 'Remember me' when you login, you should receive a cookie with a username and password that will allow you to login without having to type your username/password combination. Note: This script is hosted on my own server, so feel free to do anything you want to the server. ( I make regular backups, so you can even erase my hard drive if you are able to!!). Thank you all for your help! Edit reason: To correct the password hashes.
  2. No, I don't have this hosted anywhere. I'm only using it as an example in a tutorial.
  3. The text editor used in these forums is just a simple textarea based editor with BBCode tags inserted by JavaScript . A WYSIWYG editor is much more complicated and much of the coding is done in JavaScript. So most of the programming that you are going to do would be in JavaScript. The only PHP code that you will need would code to load and save the from the editor. To get started, learn how to load/save text from a textarea.
  4. There is nothing in PHP that I know of that will be shared between multiple users. The best PHP has is sessions, which are only shared between page requests for the same user.
  5. Here is how two servers can communicate with each other: Server A requests page_1 from Server B and includes a 'callback' URL pointing to a page on Server A Server B process the request and when it is finished, it sends a request to the 'callback' URL that it received from Server A Server A handles the 'callback' URL and is now communicating with Server B in response to Server B's request. I don't know if this is what you were thinking of, as I didn't understand your problem very well.
  6. Have yo checked that "../Connections/Prodnet.php" is getting included properly. Have you set error_reporting to E_ALL? You should be getting error messages. http://www.phpcodinghelp.com/article.php?article=debug#basic_error_messages
  7. Yes, you need to use $_GET['product_id'] rather then $_SERVER['product_id']. If you don't understand why, add print_r($_GET); and print_r($_SERVER); and you will see the contents of both of those variables.
  8. Having nested directories like that is for avoiding problems caused by having to many files in a directory. It is a common way to do that. The apache cache is one example
  9. If both the $user_id and $filename directories did not exist, and you used the mkdir command like you are, it would need to create the $user_id directory and the $filename directory. That may or may not work. I'm not sure, but I think it's worth looking into, because the unix command 'mkdir' requires a special argument to do something like that. Just for curiosity, try this. It might work: mkdir("../../images/photos/$user_id/$filename1/", 0777, true);
  10. Try using absolute pathname rather then relative pathnames or at least while debugging. It looks like you might be trying to create two directories with one mkdir command. I'm not sure if that's allowed or if you have to specfiy the 'recursive' argument to do that. Check the manual: http://us3.php.net/mkdir Have you checked if the script has the proper permissions to create a file in the 'photos'directory
  11. How to set php.ini values in .htaccess: http://us2.php.net/manual/en/configuration.changes.php I'm not sure where to put .htaccess files. That's an apache problem.
  12. That is strange! Ok, so we have confirmed that the if statement is correct and the trouble is somewhere around the 'echo "$id"' or echo "$test2" lines? Have you already defined the variable $test2 that you are echoing with echo "$test2"? Do you have error_reporting set to E_ALL? http://www.phpcodinghelp.com/article.php?article=debug#basic_error_messages Are you manually setting the '$id' variable to '1' for debugging purposes or were you wanting it to be $id = $_GET['id']? Is there anything in 'config.php' that is messing up the script? Is 'config.php' included into your script more then once? Have you checked the SQL query? Does it work correctly by itself?
  13. This looks like a PHP related problem if you don't get echo id or 'test2' line It looks like your $_GET['id'] variable is not set. Try putting print_r($_GET) right before the IF statement. That will show you what $_GET vars are set and if the $_GET['id'] variable exists and is correct.
  14. When you go to process that text with PHP, you strip out or disable all HTML tags. Then tag the approved BBCode tags and convert them to HTML. Also I want to double check that you understand that JavaScript or any script that can be put between <script></script> tags can not be run on your server and only can cause trouble on the clients web browser when it is redisplayed by the PHP script.
  15. And advanced editor like fckeditor will return HTML contents, so there is no need to use bbcode. ( IE. HTML is greater then BBCode) If you want to use BBCode use a simple textare like in these forums.
×
×
  • 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.