-
Posts
15,289 -
Joined
-
Last visited
-
Days Won
436
Everything posted by requinix
-
The code could use some improvement but it should work. Have you done a View Source of the page to make sure the HTML being outputted is correct? Does "cannot get it right" mean anything more than just the checkbox remaining unchecked?
-
You know what would be even better than that? Not storing the duration. Like Barand said, you don't have to bother storing it and then worrying about what to do when values change when you can just call TIMEDIFF whenever you need it.
-
TIMEDIFF returns a time string, not a number. If you need a number then try TIMESTAMPDIFF.
-
1. As far as I can tell, the "rules" is supposed to be a string - not an object. If you didn't need to account for is_page_loaded then you should say <validation-provider ... rules="required|positive_price"> 2. The validation function needs to return true or false. You are returning string or false.
-
They aren't the same width because you don't have any sort of CSS in there that says anything about a width. It's not like the browser can read your mind about how you want it to appear... Have you tried giving the buttons a width?
-
Hopefully you being new means you didn't write that code. Right? Because it's... not good. How about some information about this thing? What it's used for? Where? I ask because the problem it's trying to solve is much, much better addressed in other ways - other industry-standard, best practice sort of ways - and I want to know whether it'll be a bother to change it.
-
Trying my best to not sound flippant, Have you tried Google?
-
Their own documentation lists a couple jsfiddles. Have you looked at them?
-
302 is a temporary redirect that is not supposed to be cached unless the server says it can be cached. Make sure that redirect - the one from nginx - isn't also sending caching headers.
-
how to make 2FA Authentication by sms, call voice or email,
requinix replied to JohnTadros's topic in PHP Coding Help
SMS/phone and email are not as secure as everyone thinks. Use OTP codes. -
Unless you want to penny-pinch your users out of individual hours, dates are easier. Which one makes more sense to you? Decide now. Don't ask. Decide. Here's a question: does it actually matter? Think about it.
-
Hmm. <script> $(document).ready(function(){ setInterval(function(){ $("#order-no").load(window.location.href + " #order-no" ); $("#date").load(window.location.href + " #date" ); $("#ip").load(window.location.href + " #ip" ); $("#country").load(window.location.href + " #country" ); $("#payment-type").load(window.location.href + " #payment-type" ); $("#progress").load(window.location.href + " #progress" ); $("#delivery-options").load(window.location.href + " #delivery-options" ); $("#cart-locked").load(window.location.href + " #cart-locked" ); $("#total-price").load(window.location.href + " #total-price" ); }, 3000); }); </script> What you're doing here is requesting the page you're currently on from the server 9 times every 3 seconds. What's worse, you get the entire page every single time, and then jQuery will disregard everything except for whatever tiny portion of it you wanted to keep. The whole process is incredibly wasteful. If you're going to do this, do it right: use AJAX and JSON to get (1) all of the data (2) at the same time (3) without tons of wasted bytes. You make/update your PHP script so that it is capable of returning a JSON object with the order number, date, IP, blah blah blah, keeping in mind that you only need to return data that may actually change. Then use your setInterval to get that data, pull out the bits of it, and update the elements on the page. For those elements, please don't construct complicated IDs that force you to do starts-with/ends-with-type matching. It's just so much of a hassle. Put a particular ID on a container element, then use classes or data attributes on the individual elements inside it. <div id="order-123"> <span data-field="order-no">...</span> $("#order-" + ordernumber).find("[data-field]").each(function() { var field = $(this).attr("data-field"); $(this).text(orderdata[field]); });
-
Warning: preg_replace(): No ending delimiter '/' found
requinix replied to PatRoy's topic in Regex Help
The basic process is, if you want literal backslashes in a regex then you need to double it to make PCRE happy, then double it again to make PHP happy. -
Problem with Xampp local Server
requinix replied to Vidan's topic in PHP Installation and Configuration
Either you did not follow the instructions correctly and you extracted the files to the wrong place, or the instructions are wrong and you need to contact whoever wrote them to fix them. Beyond that, I told you what to do. -
Warning: preg_replace(): No ending delimiter '/' found
requinix replied to PatRoy's topic in Regex Help
regex101.com doesn't know that you're trying to put the regex into a PHP string. Escape the backslashes. -
how to connect & query mariadb in php C extension code.
requinix replied to mario_s's topic in MySQL Help
MariaDB is just an alternate version of MySQL. Use PDO and pdo_mysql. -
Issue with PHP login & registration form without using a database
requinix replied to Pocket's topic in PHP Coding Help
You didn't describe the problem, but I would expect it has something to do with logging in never working. Because of passwords. register() needs to stored the (hashed) password in the user file. It's currently storing the hash of an empty string. Then login() needs to use password_verify to check the inputted password against the hash. -
A soap "sequence" doesn't mean a collection of things. It means that the child elements are present and in the order given. So Date should be a single thing containing a Day, Month, and Year.
-
If someone doesn't want to be seen they'll just hide from the camera. Or worse, they'll take their own picture of the person they want to log in as and use that. Know that this is not real security. But as said, yes: you can use Javascript to get a still from the camera, then upload that like any other file.
-
Problem with Xampp local Server
requinix replied to Vidan's topic in PHP Installation and Configuration
Go back over the installation instructions to see what you missed. For example, you may have missed where it said that you extract whatever source you had into htdocs directly and not inside a subfolder. -
Not in any way that someone who would want to lie about their identity couldn't circumvent.
-
Well, the table structure isn't really good to work with. That's your real problem. Because as far as I can read that table, Kent has a total cost 200 and total payment 100, and Iya has total cost 160 and total payment 60. You need a concept of separate orders and payment. One table stores the 100 cost for Kent, then another table stores the 50 cash payment and 50 card payment.
-
Problem with Xampp local Server
requinix replied to Vidan's topic in PHP Installation and Configuration
If you insist on using /auth/login then go back over the installation instructions to see what you missed.