Jump to content
Old threads will finally start getting archived ×

requinix

Administrators
  • Posts

    15,259
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by requinix

  1. This "2D" array is actually just a regular array like everything else, except that the keys are named like "0" and "1" instead of "logos". If I understand the way this works correctly, you should be able to write something like (0)(/name)(/0) to get Steven. If you don't want to write (0) or (1) then you'll have to figure out some new syntax...
  2. If you can create CSS rules that target mobile devices then you can create CSS rules that target desktops...
  3. Shot in the dark, but you don't happen to be reusing that second modal's ID for anything else on the page, are you? Can you take the same (partial) markup, stick it into something like JSFiddle, and get it to work?
  4. Does their example work for you? Because if their example works then there's something different...
  5. Have you already compared what you have with their example of how to do two modals? Which worked for me...
  6. Been a while since I've done Bootstrap... Have you tried configuring it to open the other modal without closing the current one?
  7. But it's the same Pokemon though, isn't it? Someone offers one up for trade and someone else makes an offer on it. Eh, whatever. It makes more sense (and it's easier) to have just the one table, but you can do whatever. Third, the whole point of a prepared statement is that it's reusable. Preparing the same statement inside a loop completely defeats the purpose of that. Create it once ahead of time, then execute it with the different values. Not that you need to do this at all, of course, since that single INSERT...SELECT will do everything for you all at once. Otherwise, I see no reason why it would only do one row. Maybe there's a key constraint getting in the way? Duplicate row?
  8. First, question: why even do this at all? INSERT INTO user_pokemon (uid, name, level, exp, move1, move2, move3, move4, type) SELECT (user id here), name, level, exp, move1, move2, move3, move4, type FROM offer_pokemon WHERE tid = (id here) Second, question: why have two separate tables for this? Don't you think it would be easier to have one table and then just mark each row as, like, "pending" or "confirmed"?
  9. If you "fixed it" but it doesn't work then you didn't fix it. That input type=file can work, I would think, however it will require changing some number of other things - I can't say exactly what since it's complicated and it will depend a lot on other things (which you haven't shown) but it can work. Either that, or go back to what you had before and do what I originally said about using Javascript to prevent the form from being submitted. Again, I can't say exactly how since it depends on things you haven't posted, but the principle is very simple: when the form is being/is about to be submitted, check that there is a value for that cover "file", and if not then stop the form from submitting and tell the user they missed a step.
  10. If you've fixed it then you don't need Javascript...
  11. Hidden inputs can't be required. They're hidden. The user can't do anything with them. Assuming you have some sort of Javascript to read a file and put its contents into that input, which is weird because it's reinventing the wheel, then use more Javascript to prevent the user from submitting the form until they've chosen the file.
  12. Done, though the thread can remain.
  13. "Not found" means you have the wrong URLs. Pay attention to what's going on in your browser's address bar. For instance, I see you link "about.php" in one page but "/about.html" in the other...
  14. Have you already confirmed with your whoami that PHP is running as the same user as you use for SSH? Have you checked for error output from the command?
  15. ...and the rest of your post is... where?
  16. Post the EXPLAIN output of your query. EXPLAIN SELECT c.branchName as Branch, ...
  17. I'd ask exactly how confident you are that the strings are definitely going to look the way you think. If you're 100% sure they will definitely be "[Stuff] Text (Page 123)" then great, but if not then...
  18. I don't think there's a simple way to see all the cookies Chrome has remembered across all sites. You can see what cookies are relevant to a particular site by pulling up the dev tools while on one of the site's pages. Related, you can see what cookies are being sent to the server by examining the request information of most anything in the network tab (at least, of the things going to your site) and also whether the server wanted to add or change a cookie in its response. Sites don't have any way of knowing your user account or the computer's name - unless the browser specifically sends that information, which requires some very specific and an unusual setup that only ever happens in intranet/company network environments, and certainly never with stuff on the general public internet. So yes, the value could be anything you wanted. In fact, all of those cookie, name, firstplay, and secplay values from the prompt can be whatever you want at all, as they have no actual relation to you or your computer. The truth is that the site sees you as any other visitor, and will or won't record you just like for them. However, you could make some minor changes from your browser to make your own cookie special - namely to make it last forever, rather than be temporary like everyone else's...
  19. Now I've lost track of what you're doing. Do you want a running total of working minutes that doesn't count non-working days (even though it seems they have working minutes being counted?) or is that a second problem? But I don't see the running total already in here. Is the SUM(@working_minutes) able to do that? If you have it, I would expect a HAVING(the effective column name) <= 1500 would work. ...that being if you want days that don't go over the total (up to your example's Wednesday). If you want days before that total and then one more day after (the Thursday) then stagger a variable/column to use as a flag: determine if the running total at that row is <=1500 but before updating it for the current row's data. The effect is that the flag flips on the row after it goes over the total. Then add a HAVING to exclude rows after that point.
  20. It works, but it's weird and confusing in how it does. There's two parts here: the Don3 value, and the "first" cookie. Everybody who visits the site is going to get a cookie (for their second and later visits) that says the user is Don3. And everybody who visits the site is going to get a cookie (ditto) for that "first" tracking. If you have either/both of those cookies set up before visiting the site then it won't count you. Regular users won't so they will get counted. But after that, everybody will have the same two cookies and won't get counted again - until those cookies disappear, of course.
  21. Perhaps you'd be interested in a function that can strip HTML tags except for maybe some that you might want to keep?
  22. Your schema is causing me physical pain. edit: Oh, you mean you want a running total? Then wouldn't you need a condition in here that only totals the hours if the date is a working date?
  23. If you're going to work with PHP then I suggest you learn the fundamentals of PHP. That's going to be really important for you to be able to write code that actually works. When you have a grasp on it, spend some time learning about how your MVC framework works. About how views work, and about this $data variable it apparently sets up in the view, and about how to use view classes to pass data. I say that because I can see (1) you did not make anything public, and (2) changing $data->mPaperId to just mPaperId actually made your problem worse. What you should (as far as I can see) be doing is leaving mPaper and mPaperId alone, make your mStudylevelId and friends public (and please rename them to not have an underscore), and then using $data in the view to reference those properties. But that could be hard to understand if you don't have a basic knowledge of PHP or of the framework you need to use.
  24. Post the code you tried, both for the class and for the view.
  25. You can't access $StudylevelId and such because those variables do not exist. You should use what's in $data. You can't access $data->_mStudylevelId because it's private. Either make the variables public, like mPaperId is, or find some other way to make those values available outside of the class.
×
×
  • 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.