Skip to content

Instantly share code, notes, and snippets.

View kingcrunch's full-sized avatar

Sebastian Krebs kingcrunch

View GitHub Profile
@lsmith77
lsmith77 / gist:4078842
Created November 15, 2012 14:22
stripping cookies for caching when using the Symfony2 HttpCache
<?php
require_once __DIR__.'/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class AppCache extends HttpCache
{
@MadaraUchiha
MadaraUchiha / mysql_comment.markdown
Last active May 9, 2019 23:07
Don't use MySQL functions in PHP - Comment for Stack Overflow
[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](http://j.mp/XqV7Lp). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.