Jump to content

justsomeguy

Moderator
  • Content count

    30,819
  • Joined

  • Last visited

  • Days Won

    29

justsomeguy last won the day on August 15

justsomeguy had the most liked content!

Community Reputation

1,068 Excellent

About justsomeguy

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

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Phoenix

Previous Fields

  • Languages
    Focusing on PHP and JavaScript

Recent Profile Visitors

287,025 profile views
  1. justsomeguy

    understanding a mobile network concept

    Ask the manufacturer of your internet device. I didn't make it, so why would I know? Do you think that there's some rule or law which requires them to do that? Because if you're waiting for me to point you to a law which says that people who make USB internet devices are required to have a connection timeout, I don't have a law to point you to. If you want me to use my brain, then I'm going to think that someone using a USB device to connect to the internet is probably using a mobile device, and it might be on battery power, so maybe, just maybe, it's a power saving measure. I would think they also would have a way to disable the timeout, like the power management settings on most laptops let you disable various things if it is plugged in, but again my name is not Huawei and I do not know why they made the decisions they made. Ask them. Look at that, another good reason. Many things are possible with the power of independent thought. Why do you expect me to make your decisions for you? You know how you use the computer, so set it up so that it works however you want it to work. I don't care how you set it up. Make a decision and if it doesn't work for you then make a different one.
  2. justsomeguy

    Login user leven

    I don't know, I don't know what you have in your database and specifically what you want to achieve. Store the user level in the session when someone logs in. I assume you have some way to get the user level from the database or otherwise determine what level a user is. When you're printing the HTML for the nav menu, use PHP to check the user level that you saved in the session to determine whether or not you want to show that HTML.
  3. justsomeguy

    Curl not returning values

    Well, the HTTP code of 0 indicates that there's a problem, because that's not a valid response code. You need to check if curl_exec returns false and print an error message. http://php.net/manual/en/function.curl-error.php
  4. justsomeguy

    Curl not returning values

    What does that mean? The first element in the array says http://0/, so your URL is "0". That's because you're using the plus sign on the line where you define the URL, and the plus sign is for addition. You use a dot to concatenate strings.
  5. justsomeguy

    Login user leven

    Store whatever information you need to know about a user in the session, and when you're printing the navigation bar check the values in the session to see if you should print each item.
  6. justsomeguy

    basic php - mySQL database login question

    The only danger there is if an attacker has access to your filesystem then they can read the contents of files like that. But if an attacker has access to your filesystem then you have bigger problems than leaking a database password.
  7. justsomeguy

    Mysql db data doesn't register

    I can't fix something if I don't know what the problem is, and I haven't seen the error messages saying what the problem is. Literally the first step in debugging is getting the error messages, and we haven't gotten there yet. So there's nothing that I can suggest. It's like calling a mechanic and telling them something is wrong with your car but not giving any other details, they can't be expected to make any suggestions.
  8. justsomeguy

    Mysql db data doesn't register

    That tutorial is a pretty good example of the kinds of things I've seen. They give you everything, or tell you exactly what to type, and offer a brief and shallow explanation. He's not teaching you why he did anything, he's only showing you what he did. That's fine if you need to watch a video on how to change a light bulb, because you don't need to know how the light bulb works, but it doesn't work as well when you're trying to learn a craft or skill like programming. I wouldn't hire someone to build a house who learned how to build houses by watching videos of what other people did, for example. I would expect them to be formally taught or have learned through several years of apprenticeship, preferably both. The code isn't the best, either. He's still trying to escape values to prevent SQL injection, which should have been replaced around 13 years ago, he doesn't always check for database errors (only sometimes), and in the brief parts he showed he'll do things like use both isset and empty, which is redundant. But even while he's doing that, he's still not telling you why he did that. All together, it suggests that he doesn't have a great understanding of programming himself, and it's hard to teach anything to anyone if you don't really understand it yourself. Unfortunately though that can be typical of programming tutorials, for whatever reason people want to try to teach things to others that they don't really understand themselves. That's probably why you're not learning, because he's not teaching you why to do things, only showing you what he did. I suspect the reason for publishing things like this is financial, those half a million views on that video have to count for something if he's spreading outdated and insecure code. But, even so, I doubt that I'm going to be able to help you. He gave you a working system, even though it has several problems, that needs to be edited in several places to get it to work right in a new environment. You would get the same kind of thing from me, a bunch of files that you'll need to edit to get it to work in your environment. That's still not going to teach you anything though, other than how to install a PHP application. I don't have time to walk everyone though everything, I help people in writing, and if you can't understand things just by reading them then I'm not sure how to help you. I can explain things to you but I can't understand them for you. If you're dead-set on video tutorials and can't get anything from a book, then at least look for tutorials on the basics. If you don't know how to program at all don't look for a tutorial on how to build an application, look for tutorials on how to process forms, or how to interact with a database, or how to use the session, or how to manage file uploads. Or, even more basic, a tutorial on variables, and functions, and classes. A half-hour video on an application that took several hours to write is going to leave a lot out. A half-hour video on only how to process forms, or only how to interact with a database (using PDO, with prepared statements) or the other individual parts that you need to know, will go a lot farther to helping you understand how things work than someone just giving a summary of what they did to build an application.
  9. justsomeguy

    Mysql db data doesn't register

    There's no reason to guess when there are literally error messages just waiting to tell you specifically what the problem is. You're running your crap on a different environment. There are all kinds of differences. That's correct. Every video tutorial I've seen for programming is complete crap. They're going to tell you that the server is fine and they don't debug people's code for free. It's the programmer's responsibility to debug their own code.
  10. justsomeguy

    Mysql db data doesn't register

    That sounds like you're not connecting correctly. Again, if there's an error with MySQL, like with connecting, it is your responsibility to check for that error and output a message if you want to. It does not happen automatically. You're also on the wrong track if you're trying to escape data manually, you should use prepared statements instead to avoid SQL injection attacks. http://php.net/manual/en/mysqli.quickstart.prepared-statements.php I always prefer using PDO instead of mysqli though: http://php.net/manual/en/book.pdo.php http://php.net/manual/en/pdo.prepared-statements.php
  11. justsomeguy

    Mysql db data doesn't register

    That's PHP code, it needs to go inside a PHP block. If the browser is printing the code then the server doesn't think it's PHP code.
  12. justsomeguy

    Defining and Calling a Function within a Function

    Well, it's not efficient to define a function inside another function that you're only going to use once, so if you're talking about efficiency then there's no reason to keep defining new functions every time you run that main function. Just put the code right in the one function.
  13. Create a design document for your software and hire programmers who can build it. WordPress, Joomla, GoDaddy, etc have programming and development teams working on them. If you don't know enough to get started then you need to hire people who do.
  14. justsomeguy

    Understanding XML namespaces

    I assume that if something understands XSLT, then that definition is built-in to whatever software you're using, and it just checks the namespace identifier to make sure that it's actually XSLT that you're trying to use. Support for that would be built-in to the software though, it's not going to pull up that human-readable web page and try to get some kind of definition out of it, that URL is for people to read. This is an example of a DTD which defines a particular schema: https://www.w3.org/2001/rddl/rddl-xhtml.dtd
  15. justsomeguy

    XML in plaintext, what to do with it?

    It looks like that's correct, several tags are allowed in a pre block.
×