Here, you’ll find chunks of PHP, MySQL, HTML, jQuery, JavaScript, and Ajax code that we’ve put together while working through various projects. Hopefully they’ll help you out in your coding adventures too. Displaying posts 1 through 10 of 84:

Get Redirect URL with PHP

PHP
This function follows redirects (even multiple redirects) and returns the final destination URL as a string. » View Post

Scroll to Div with jQuery

JavaScript | jQuery
Find the top of an element on your page and scroll to it (without animation) using jQuery. » View Post

List of PHP Supported Time Zones

Data Dumps | PHP
An easy-to-copy display of all the supported zones, plus code that you can use to create your own dynamic list and HTML to populate a dropdown. » View Post

Regex Checking of Foreign Characters in PHP

PHP
How to handle extended characters (like the é in café) with regular expressions. » View Post

Set Colors of Links Within Bootstrap Alerts

Bootstrap | CSS
Bootstrap’s alerts work great, but links within them don’t match. This CSS changes that. » View Post

Zoom in on Hover with CSS

CSS | HTML
Use CSS to zoom in when a user hovers over div or image (and keep it from expanding). » View Post

Responsive Parallax Images

A quick tutorial on creating parallax images that scale down for mobile screens with CSS and jQuery. » View Post

Fade Between Two Backgrounds

CSS | JavaScript | jQuery | TweenMax
Using CSS and JavaScript, fade between two background images. Includes a working example. » View Post

Convert mcrypt Keys in PHP

PHP
Fix this error: Warning: mcrypt_decrypt(): Key of size 29 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in file.php on line 30 » View Post

Simple PHP Upload Form

PHP
A tested and working form that allows for the user to upload a CSV file. Can be easily modified for other file types. » View Post
» Next · End · Categories