Programming

html5 moraga – 6:43 pm

Placeholder plugin for jQuery

Placeholder its a new attribute of HTML5. Your functionality is add label inside inputs when empty. >input type=”text” placeholder=”Enter your name here!” /> Some browsers like Firefox in version 3.6 doesn’t have support for this attribute. The code below is an plugin for jQuery that simulate placeholder. (function($) { $.fn.extend({ placeholder: function() { return this.each(function() [...]

wizard moraga – 6:27 am

From array to URL

$_GET is an associative array of variables passed in URL. Example: http://exemplo.com?name=Alejandro&age=23&gender=male That URL have many variables: print_r($_GET); array ( name => Alejandro, age => 23, gender => male ) We can access the variable values using indexes: echo $_GET['age']; // show 23 echo $_GET['gender']; // show male From array to URL parameters Doesn’t exists [...]