-
Posts
2,134 -
Joined
-
Last visited
-
Days Won
42
Everything posted by benanamen
-
I know. That was just an "in addition to the problem". I agree the problem is the preceding code.
-
Is FUNCTION_NOT_FOUND actually a defined constant? The logic makes no sense. If the function exists, it is "Not found"?
-
Sounds like a great opportunity to learn something new. I just happen to know about a great PDO tutorial that is easy to understand with great copy/paste code examples. If you get stuck with it come on back and we will help you out. https://phpdelusions.net/pdo
-
You have absolutely no code that does anything with your query string. Start with this tutorial and then give it another try. https://phpdelusions.net/pdo
-
That is an interesting number format I have never seen. Could you please tell us what that is about and what it represents.
-
Since you are new, you may not know the authors of Php have offered a free manual. You will need to refer to this manual all throughout your programming journey so best to bookmark it. Php Manual. Here is the specific manual page that will teach you about if/elsif/else. https://www.php.net/manual/en/control-structures.elseif.php
-
I got mixed up on who was saying what. I thought @SaranacLakesaid that regarding what he was trying to do.
-
Ok, so a subscription _ types lookup table with subscription_type_id, subscription_type_description Then in data table you have subscription_type_id keyed to the lookup table.
-
Seems to me it would be better to have contract_start and contract_end date columns. If you will be needing historical data then you would have a table for storing each term start/end dates keyed to the user_id. You will also gain a lot of flexibility with being able to do date calculations and Analytics.
-
That is incorrect. It does exactly what it says, it resends the request. If you modified the request, the modification is sent. You likely didn't test it properly. Test it on a request that updates a database record and see what happens.
-
And there is your REAL problem.....
-
Is that the way it is in the CSV file?
-
The you should be using INET6_ATON Ok, Why is it in that format?
-
Why?
-
https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_inet-aton
-
"They" sure can! Not only read it, but manipulate it and even send parameters that are not in your form. This is why you need a whitelist of expected/allowed fields and validation.
-
That would be better. You would look up the price from the db when you need to actually do something with it.
-
No, it is trivial for a user to change the price submitted.
-
Prevent Arrays With preg_match() function
benanamen replied to mojobadshah's topic in PHP Coding Help
How about telling us what the real problem is that you are trying to solve with this code. -
Subquery, use results from one query in another
benanamen replied to Adamhumbug's topic in MySQL Help
You need to do a JOIN with the table the holds the user info. You only need one query. -
PHP login system fetch username and redirect issue
benanamen replied to etopal's topic in PHP Coding Help
Except that isn't the solution. For one, if you dont kill the script after a header redirect, the rest of the code still runs. Using a sequential numbering of pages points to a serious design flaw. If you have a million users, are you really going to have and maintain a million pages? -
That is a very poorly coded script and is very vulnerable to an XSS Attack.
-
I agree. Stop doing code gymnastics and just store the data the way you want it.
-
@zeus69, on an programming help forum it is expected that you have first made some sort of attempt at solving the problem you are asking about even if it's just a google search. That is why you get asked "What have you tried so far?" You said "I didn't do anything", thus the lack of interest in helping you. You need to make some sort of attempt at solving the problem yourself. If you get stuck, post on a forum what the overall problem is that you are trying to solve and what attempts you made at solving it along with the results you got and the results you expect to get. I would suggest you read through this page before posting on any help forums. http://www.catb.org/~esr/faqs/smart-questions.html