I m trying to do a registration page from an android activity connectiong the datas to my sqldatabase, I m getting this error ” org.json.JSONException: Value First of all, could anyone advise me on …
Abstract constants in PHP – Force a child class to define a constant
I noticed that you can’t have abstract constants in PHP. Is there a way I can force a child class to define a constant (which I need to use in one of the abstract class internal methods) ? Answer A constant is a constant; there is no abstract or private constants in PHP as far as I know, but you
Convert MySQL login script to PDO
I’ve written a functional login script using MySQL. However, I’ve now been told that it needs to be done using PDO, and I’ve a functional PDO connection: function getConnection() { $userName = ‘**…
What is a PHP code generator?
I’m thinking of using a php cms, a php framework or php code generator. A php cms is restricted somehow and with a php framework and a php code generator I have more freedom. But what exactly is the difference between a framework and a code generator or what do a framework share with a code generator? I…
UTF-8 safe equivalent of ord or charCodeAt() in PHP
I need to be able to use ord() to get the same value as javascript’s charCodeAt() function. The problem is that ord() doesn’t support UTF8. How can I get Ą to translate to 260 in PHP? I’ve tried some uniord functions out there, but they all report 256 instead of 260. Thanks a lot for any hel…
Storing application permissions in a database
I’m developing an application for our company that eventually will have lots of ways of restricting users to particular sections/modules. While the application is still small, I’d like to move to a new method of storing permissions that, as the application grows, will remain easy to maintain and q…
special characters turn into question marks php html
I read all the topics found on stackoverflow and other forums, it’s hosted on hostgator and I’ve never had problems with their servers before although quotes for example are transformed into question …
Doctrine query using findBy and update entity
I am fairly new to Doctrine2 and I am trying to learn how to query entities and updating them. The method I am using to query is the findBy method on a specific attribute to search for a list of …
php: the best way to check if string ends with an element from array?
What’s the best way to check if $str1 ends with some string from $arr1? The answer true/false is great, although knowing the number of $arr1 element as an answer (if true) would be great. Example: Is there any better/faster/special way than just comparing in for-statement all elements of $arr1 with the …
PHP server for Android turn based multiplayer game? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question I developed a turn based game for Android, and now I want to add multip…