-
Posts
15,274 -
Joined
-
Last visited
-
Days Won
432
Everything posted by requinix
-
You "only" want to use it for desktop and mobile? Okay... so what do you not want to use it for? If you want WEBM at all then can I assume you did not remove support for it from the conversion script? And what does "no go" mean when you say it's not working? How is it not working? What do you want it to do and what is it actually doing?
-
You changed it from using MP4 to using WEBM. I thought you said you were removing support for both of those? According to caniuse.com, WEBM is generally supported with VP8 as the most portable codec.
-
Can I assume you've tried Google? I just checked now and I'm seeing some relevant results.
-
Hold on. How did you arrive at those two dates?
-
jQuery will consider it an error if the request responds with a 4xx or 5xx status. You can use http_response_code to set it. Suggested status codes are: - 400 if the request didn't have the fields you need - 400 if the new username was invalid - 403 if the user tried to update the status of someone they're not supposed to jQuery won't deserialize the JSON for an error response so your code should attempt to do that itself. Then it can look for an error message.
-
Cannot call Session Variable to regular variable for SQL lookup
requinix replied to bakertaylor28's topic in PHP Coding Help
It's not just about user input. It's about not knowing right there at that moment whether the value is safe. Can you guarantee that there is no possible way a username could have anything wrong with it? Not just in the database but also the value stored in the session? Modern day "hacks" are not about finding a single problem that gives someone complete access. They're about finding a series of small vulnerabilities that combine to form something large. In your case, perhaps there's a way to get a username that's kinda invalid into the database, and then maybe there's a flaw in some code that loads the username into the session, and then maybe there's a flaw in this particular script where the bad username in the session can turn into SQL injection. That's why application security is so difficult: to protect yourself you have to make sure that everything is covered, but for a malicious user all they have to do is find one or two problems.- 12 replies
-
- 1
-
-
Cannot call Session Variable to regular variable for SQL lookup
requinix replied to bakertaylor28's topic in PHP Coding Help
"Quoted" is the term ("escaped" is like what you might do with backslashes) but yes: just like how strings in PHP need quotes around them, so do strings in SQL. But adding quotes isn't enough because there's a risk the username will have something harmful in it. Use a prepared statement.- 12 replies
-
Cannot call Session Variable to regular variable for SQL lookup
requinix replied to bakertaylor28's topic in PHP Coding Help
Let's investigate that. if ($result = mysqli_query($link, "SELECT su FROM accounts WHERE username = $user", MYSQLI_STORE_RESULT)) { There's the query. Does it look like there might be anything wrong with it? Try putting that string into a variable, echoing the variable so you can see the exact query, and running that query yourself manually.- 12 replies
-
Cannot call Session Variable to regular variable for SQL lookup
requinix replied to bakertaylor28's topic in PHP Coding Help
while ($row = $result->fetch_assoc()) { $priv === $row["su"]; } What is that second line doing?- 12 replies
-
SQL Database Display problem in php 7.0
requinix replied to bakertaylor28's topic in PHP Coding Help
You're putting the entire table in there. The only thing you need you need to repeat is the data row (that being the second <tr> and what's inside it). You'll also have a bit of a problem with where your code is. The loop is before your <html> so you can't put the table row in there. Instead you need to move the loop itself. That also means moving the mysqli_close, since you can't very well read the query results once you've closed the connection. The good news is that you don't need to close the connection in the first place. PHP will do it for you when the script ends. -
SQL Database Display problem in php 7.0
requinix replied to bakertaylor28's topic in PHP Coding Help
That's true, as far as I can tell what you're talking about. But that loop you have only uses some variables. Every time through the loop it updates those same five variables to have five new values. By the time the loop ends, all you have left is whatever the five latest values were - everything that happened before is lost. You've got a loop that can go through all the results. You've got some HTML for a table row. Instead of using the loop for some variables, use the loop for the table row. -
I don't see anything mobile in that code. If you want to use the desktop video then adjust the URL the "mobile side" uses. Probably using the above code as a reference.
-
SQL Database Display problem in php 7.0
requinix replied to bakertaylor28's topic in PHP Coding Help
Have you considered using a loop? A loop very much like the one already written in there? -
SQL Database Display problem in php 7.0
requinix replied to bakertaylor28's topic in PHP Coding Help
Besides the header, your table has exactly one row in it. If you want to display multiple data rows then you're going to need multiple table rows too. -
I would be extremely surprised if you could not. Unless they renamed it, the field will be called "custom" something.
-
When you submit the information to PayPal, you can give them some custom data. I suggest an order ID.
-
How I can display dropdown menu list based on my JSON response object?
requinix replied to prohor's topic in Javascript Help
The response isn't HTML. You can't just shove it into that html variable. jQuery, right? Forget building HTML strings manually. That sucks. If you give the $ function some element, such as that <option> you wrote up there, then jQuery will create it as a new element for you. And you can .appendTo the <select>. Then similarly, you can create blank options without anything, use functions like .val() and .text() to modify them according to how you want each (tip: that means a loop) to look given the response data, and append them to the <select> as well. Note that since you're appending new elements, you'll probably want to .empty() the dropdown before you start adding things to it. Give that a shot. If you have problems, post the code you wrote and a description of how it goes wrong. -
You've only posted, and most likely looked at, the script that does conversions. Did you look at everything else too?
-
Again, you haven't gone into any sort of detail about anything regarding these dropdowns so I have no idea what it is you need to do. Besides... use Javascript? If you want more detailed advice then you'll have to start posting code and markup and whatever you have, along with a complete description of what sort of "data matching/comparison" you're talking about.
-
It's not like the experience is entirely unusable... Make the scanner so it gets the data from the QR code. Use Javascript to do whatever it takes to validate with the dropdowns - I have no idea what this part is since you didn't go into much detail about it. Then either you submit a form or you send an AJAX request to the server to store "the timestamp" (what timestamp?) in the database. Break the whole thing down into discrete steps: scanning the QR code is one, validating with the dropdowns is another, scanning the second QR code is a third, and so on. Work on each step in turn.
-
Store it using YYYY-MM-DD. Always. If you want to display it differently then you can display it differently.
-
Yeah, sure, it sounds all very possible. What do you need recommended? Sounds like you already know what you need to do.
-
It can be hard to know what the problem is when we cannot see the page in our own web browser, but You have float:left for your images but not for the pagination links. float is not very good and CSS has better options for how to display items. For example, try display:inline-block instead of float:left.
-
"cannot get it to work" means nothing. What do you expect it to do and what does it actually do? Are there any error messages? On the subject of error messages, you need to check for errors with the file upload before you try to do anything with it. Addressing this in your code now will likely help you identify the problem.
-
Yeah, pretty sure you've got a custom subnet for the VM images. They need to be bridged with the host so they're all connected to the same 192.168.1.x network. That's the only way anyone outside of the host will be able to connect: if they're on the same network.