justsomeguy

Moderator
  • Content count

    29,776
  • Joined

  • Last visited

  • Days Won

    336

justsomeguy last won the day on May 21

justsomeguy had the most liked content!

Community Reputation

900 Excellent

3 Followers

About justsomeguy

  • Rank
    More Human Than Human
  • Birthday 06/03/1979

Previous Fields

  • Languages
    Focusing on PHP and JavaScript

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
  • Location
    Phoenix

Recent Profile Visitors

262,932 profile views
  1. If you're asking more generally about multiple return statements in a function, a return statement causes the function to stop executing at that point and return the value back to the calling scope. Multiple return statements will not be executed because function execution stops whenever a return statement is reached.
  2. If you are referring to a property or method of a class, you always access it via a class or scope object ($this in the case where you are referring to a property or method inside the same non-static class). That's how PHP knows you are referring to a class member and not a regular variable.
  3. Where are you setting the session information? We need to see all of that code if there's a problem with it. Are you starting the session on every page?
  4. You're not printing any of those options into the select list. This is the problem with not understanding the code you are working with. We are here to help people learn how to program. We expect people to start on their own, and make an effort. If you're not going to go through the tutorials to learn the basics about how this stuff works, how can we help you? Just doing everything for you does not teach you anything except that when you have a problem you come here to get the answer. That's not programming.
  5. Maybe you're using an older browser that doesn't support CSS transitions.
  6. Do you know how to get the value of the first dropdown? You can either submit it regularly with a form, or get it with Javascript and send it with ajax. I've already asked you these questions though, you seemed to indicate that you know how to get the value from the form. If you don't, you need to hit the PHP tutorials to learn the basics.
  7. Like I mentioned in the other thread where the original question got removed, that is markup from versioning control software that is showing the differences between two versions of a file. You downloaded the diff instead of the source code.
  8. Yep. The alternative is to not list the columns in the table and only give the values: INSERT INTO table VALUES ('val1', 'val2', 'val3') But, like I said, if you ever change the structure of that table then that query is going to break if you've changed the number of columns. It's best to just list everything out explicitly. You don't have to pay per character in your source code, make the code as obvious as possible so that it's easy to maintain. Ease of maintenance should always be a higher priority than something like how long the code is.
  9. I don't see a technical reason to restrict the characters or the length of a password at all. If someone wants to use the text of the Magna Carta as their password, fine. Like Ingolme said, the password should be hashed anyway and that's going to result in a string of a specific length no matter how long the input text is. If you want to enforce decent practices for passwords then that would be things like finding a list of the 1,000 most commonly used passwords and disallowing those, adding brute-force protection so an attacker can't keep trying passwords until they get it right, etc.
  10. Let's keep the discussion about the same issue in a single thread. The explanation for how to do this is still the same, so what's different? You still need to get the value from the first dropdown, and use to build the second dropdown, however they relate? Which part are you stuck on?
  11. If you're using mysqli in PHP then you still need to write the SQL code. mysqli is just an extension for using MySQL, it's not an abstraction layer like you would get with Zend Db or something where you're building PHP method calls instead of writing SQL queries.
  12. That's just a normal database-driven application. You'll need to design the database to support the features you want, including authentication and authorization.
  13. Moved to PHP. Those are for versioning control software. It looks like you downloaded a diff instead of the source code.
  14. I wasn't suggesting storing the actual file data in database, that's definitely inefficient, but when you're talking about making the most recent things available and controlling access then it sounds like you use a database to keep track of your articles, when they were added, who gets access, etc. Everything except the actual files.
  15. I understand that an RSS feed is XML, but the links that go in that XML, the software used to create the XML, and the server security aren't related to XML. That's why I was asking why a question about directory security was in the XML forum. IIS is Internet Information Services, the Microsoft web server that runs on Windows. You didn't say what your environment was so I pointed out that URL rewriting can be done using htaccess in Apache, or another way in IIS. I assume nginx and other web servers also have a way to set up URL rewriting. Linux isn't a web server, it's an operating system, like Windows. Apache, nginx, IIS, etc are web servers. Your Linux server is probably running Apache. Yes. Like I mentioned, browsers often send partial requests for audio or video content. If you don't support that then the client will wait until the entire file finishes downloading before starting to play it. I'm not aware of a class that will do everything, when I implemented directory security and authorization through PHP I wrote that myself. Things might have changed since then. There might be something for your web server, like an Apache module, which is built to take a request and run a PHP script to handle authentication and authorization, or maybe a module that would check your database directly without going through PHP. I looked into some of those things but at the time I didn't find anything that perfectly matched what I was trying to do.