-
Posts
15,266 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
I haven't seen anything to suggest this sort of behavior is not allowed... What's your code? If it handles those URLs at some point between the RSS and Telegram then you can simply remove the query string before submitting them.
-
Why remove it? What's the problem?
-
check value stays unchanged even after form submit?
requinix replied to lovephp's topic in Javascript Help
Okay, great, so now we've established that the code you're posting is not the actual code you have. The first step is to post your actual code. Also, if you need to know three states for the input (default, checked, unchecked) then a mere checkbox is not enough because all it can tell you is whether it was checked. You'll have to combine that with knowledge about whether the form was submitted. -
Validating HTML and counting elements
requinix replied to NotionCommotion's topic in PHP Coding Help
To validate the HTML... well, you know HTML is rather flexible. "string" is valid. " string" is valid". Some stuff you might consider invalid is still acceptable to browsers. I'm thinking (a) just load it with anything in PHP that supports HTML and see if it complains, or (b) try Tidy. Maybe your end result should be less valid/invalid but whether it's supposed to be valid already and you can just fix it if it has minor errors? -
check value stays unchanged even after form submit?
requinix replied to lovephp's topic in Javascript Help
I don't get why you expect it to show anything other than 5. It's what you put into the HTML. Directly. No PHP code, no variables, no Javascript to update the value on page load... Why do you think it should be anything other than "5"? -
Notification emails would have been broken too. Are they working now? Actually, I can see some emails to you being sent. A couple bounces. You should be receiving a lot of them about now...
-
Rpc technology to enable remote access to my application db.
requinix replied to glph's topic in PHP Coding Help
Direct access to the database is a really bad idea. Really bad idea. Why can't you modify the application, in order to implement an API? That is the best option. -
Once again, validation and notification emails broke on the server. They should be fixed now. I don't remember what the earlier issue was but I think this one is different. It's going through the backlog of verification emails so anybody missing theirs will probably get them within the next day or so. If you still haven't received yours by then, or want it now, then use the Resend link at the top-right of the page. (If you don't have a link then you don't need to validate.)
-
How can I rewrite .JPG to .jpg on any incoming urls
requinix replied to shadiadiph's topic in Apache HTTP Server
Apache's mod_speling has something to "fix" case-sensitivity problems. In your case it should respond with a redirect to the properly-cased filename. CheckCaseOnly onCheck your server access logs periodically over the next few months. When you see that the number of requests to the uppercase filenames has dropped to nearly zero then you should remove the directive and let nature take its course with the remaining stragglers. -
There are too many things that are optional in that regex. Either you need to make some stuff required or you should combine some of them with alternation and make the whole set required. (first?)(second?)(third?) -> (?:first|second|third)If neither of those then we might have to rebuild the regex from scratch...
-
I can't tell what you're asking for. Do you have an example of the input string, current output, and desired output? "or one". Not many. * is none or many.
-
Why does something like this need to be in a configuration file? Requiring some specific number of digits is silly, and making that variable seems even sillier. Passwords should contain at least one digit - isn't an option to enforce that sufficient?
-
Purely random passwords will probably already contain mixed letters, digits, and symbols, so they meet nearly all password requirements already. But surely you recognize that you're in the vast minority of users: a typical person will use a word or two plus a couple numbers as required by the system, and will not have something that creates and remembers passwords for them. Yeah, users may not like password rules, but (a) they're getting used to them and (b) whether they realize it or not they would rather have a more complicated password than have their account compromised. I assume your passwords already contain at least one of everything, right? Uppercase letter, lowercase letter, number, and symbol. If not then they're not as secure as they could be, and I know you hate when stuff isn't as secure as it could be. So there shouldn't be any problem with that. Length is the only other requirement, but it's almost always just minimum length and I can't imagine your passwords being less than 8 characters long - the most common minimum length. Stuff like a maximum length, or "no more than N" types of characters, and certainly not "may not contain any of X" symbols (not counting, like, not containing a name or username) is bad and should not be used. Naturally. I assume we're not talking about those. What makes no sense is why your random passwords would be not secure enough to meet a site's good password requirements, and why altering your rules to fit those requirements would make them weaker. Fun fact: Passwords used by Visa's "Verified By Visa" program have to be, like, Inexperienced users will wonder what they have to do to make the bar go green, get longer, or do whatever, so some mention of guidelines is good. But if someone is registering with an important system - say, their bank - simply encouraging them to use a strong password may not be sufficient. A red meter tells me that my password of "lincoln15" sucks but doesn't actually make me do anything about it. Password constraints exist to make sure people pick technically-secure passwords. They don't always have to be used, opting for the strength meter or a mere list of guidelines instead, but sometimes they should be.
-
You drive a hard bargain... You have a deal. But you need to do me a favor: I have this friend that needs help moving some money around. I can't be too specific but he's a VIP in Nigeria, so you know he's trustworthy. I've already done what I can, and he even paid me for the time and effort, but he needs to get more people involved because he has so much money that his government would get suspicious if he had just one person help. He gave me 6% of the transaction fees because I'm his friend and he knew I needed the extra cash to pay for an extension to my house (four bedrooms just isn't enough, you know?), but I'm sure I could negotiate 3-4% for you. You'd have to prove to him that you're willing to help by transferring a bit of money to him first - just enough to prove that you have a working account with some real money in it - but as soon as he sees you've done that he could get right on with the complicated transfer work. I say "complicated" because you'd probably see your bank account balances fluctuate for the first couple days, but don't worry because he knows what he's doing.
-
Build a gooey in Visual Basic to backtrace the IP. I can. Send me the $50 now and I'll get right on it. It'll probably be a while until I'm done so don't bother asking me for things like status updates.
-
Mimicking autoincrement primary key using PHP
requinix replied to NotionCommotion's topic in MySQL Help
I really don't like them but a stored procedure might be best. A few lines to lock the table, calculate the IDs, insert, and return the ID(s)... then a few more to handle potential errors. The separate table can do it, but either you move the IDs into it and always have to do a JOIN (or use a view), or you copy them and thus store the IDs in multiple places in the database. Huh. I hadn't noticed this was in PHP. Moving... The column that should auto-increment goes last in the primary key. So (accounts_id, id). -
Mimicking autoincrement primary key using PHP
requinix replied to NotionCommotion's topic in MySQL Help
Actually it does. Make the primary key be (id2,id1) and put auto_increment on id1. Oh wait, you said InnoDB. And I assume moving that table to MyISAM isn't an option. NEVERMIND. ...Maybe a trigger? Or a separate MyISAM table just to generate those IDs? -
Cloning elements will not also clone event handlers. 1. Change your New button (preferably Copy too) to use a class instead of an ID. Remember: IDs must be unique so if you create a clone then you'll be duplicating the ID too and that's not good. 2. When DOM events happen in Javascript they happen to the original element as well as all parent elements. With .on you can apply an event handler to a parent that only fires for specific children that match a selector, whether they exist now or in the future. Use that to tie your New action to all buttons in the entire document that match that CSS class you picked.
-
You're trying to call fetch_assoc on whatever the setFetchMode function returned. 1. You need to call it on a statement object. 2. You might be confusing PDO with mysqli. PDO does not have a "fetch_assoc". Use one of these instead.
-
Preventing main file functions from being global
requinix replied to NotionCommotion's topic in PHP Coding Help
I'd avoid the closures: they come with increased memory usage that does not get cleaned up until you use hundreds or thousands of closures. By design, which I still don't understand but is intentional. If you want non-global functions, use namespaces or utility classes. -
Give users random subsets of questions from different "chapters"
requinix replied to wee493's topic in PHP Coding Help
+1 to storing. Think of it not about the user answering the general "Linear Algebra" quiz but about them generating their own dedicated "Linear Algebra #1234" quiz and then answering it. -
Don't do anything. The only thing you should ever do with a password is make sure it is "secure enough": letters, numbers, symbols, minimum length, not a common password, doesn't contain their username, that stuff. The odds of two users picking the same password and getting the same salt are astronomical and, most importantly, it doesn't matter if it happens. (Would be cool to see, though.) in b4 jacques
-
Sounds like it requires approval from both the M and AM. So two flags, like in case the M approves before the AM or vice versa. +1 to how it depends what other data is involved. Do the M, AM, DM, and executives all have more or less the same data associated with them but have different ranks? Will some information need to be tracked for some positions and not for others? But on that note, I'm not sure how much needs to be represented here in the first place. This is part of a sort of hiring process, right? Then these tables should track only hiring information - when someone applied/was headhunted, approval dates, notes, etc. - while actual employee data for the people who have been successfully hired belongs elsewhere.
-
I think Groot is trying to say he wants to make the page on the other site do something, such as open a popup window upon arrival. If that's the case then no, it is not possible. You cannot make someone else's site do something it wasn't designed to do.
-
D: