-
Posts
15,232 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
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. -
Problem with Xampp local Server
requinix replied to Vidan's topic in PHP Installation and Configuration
htdocs is the root of the website. Since you put all the files in that "schoolApp-master" directory, try http://localhost/schoolApp-master/auth/login. -
Can you create a PHP website connected to a database... using Access or Excel? No... Well actually yes, but don't. "Never" isn't as important as "it's running when people need to use it". So far it sounds like a standard PHP-website-with-a-database setup. There are plenty of tutorials out there to help you get to that starting point, so if there's a particular place you've gone to before that you liked then you should give them a shot too. Only particular requirements I would suggest looking for are that the tutorial talks about PDO and it uses PHP 7.0 or later.
-
Problem with Xampp local Server
requinix replied to Vidan's topic in PHP Installation and Configuration
You probably won't get a whole lot of help if people have to download something from Mediafire... Are you sure that /auth/login is the right path? Is the PHP stuff set up properly? Are there other students or teachers (you know, people who've worked with this) who might know what's wrong? -
If you won't have reliable internet access, MDN has a good write-up about a couple common tools you can use through Javascript.
-
What they're getting at is, do you want a survey tool or do you want to make a survey tool? Because if you have internet access then there's plenty of free options you can use without needing to create something new.
-
substr If $teams[0] or $teams[1] is less than 25 characters, substr() will return the whole value.