August 30, 2009 at 3:09 AM
I will share my best PHP class to help you connect to MySQL. It is easy to use (easier than the classic way). It is fast and it helps you if you forget to escape some strings before inserting or things like those.
If you use it please reference me, this site and my email address (as a comment in the code is fine
)
Read more…
August 20, 2009 at 6:08 PM
I just had a rather idiot error in CakePHP: I have a page with an ajax loaded area. In the webpage the session variables were not recognized but in the ajax loaded area they were (no matter how many refreshes of the page).
I did not find the source of the problem, however I have a fix (I don’t know how to reproduce the bug, I just know it happened and so it could happen again). To whoever might need it: If you have the app_controller created, if not, create it yourself, or whatever, make sure you have the following:
1
2
3
4
5
6
7
| <?php
class AppController extends Controller {
function beforeFilter () {
parent::beforeFilter();
if (!isset($_SESSION)) session_start(); //cakephp dumb fix
}
} |
August 5, 2009 at 4:15 PM
Yet another dumb IE fact: Internet Explorer adds margin to the <form> tag.
So everytime you start a CSS you must enter (besides other):
1
2
3
| form {
margin: 0;
} |
One more time… Thank you Microsoft for the great product that is Internet Explorer, NOT.