Paint with Canvas, HTML5 and jQuery

paint canvas html 5

In the following example, I want to show a paint made ​​with html5, canvas and jquery. I have also used Twitter Bootstrap and farbtastic: See live example clicking here You can download all the files clicking here Most important files - index.html <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Paint HTML5 Canvas www.Ajax101.com</title> <!-- JS --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script src="http://web.desarrollaraplicaciones.com/paint/dibujo.js" type="text/javascript"></script> <script type="text/javascript" src="js/draw.js"></script> <script type="text/javascript" src="js/farbtastic/farbtastic.js"></script> <script type="text/javascript" src="js/jscolor/jscolor.js"></script> <script ...

Example AJAX with JSON, jQuery, PHP and MySQL

example ajax jquery mysql

Today I will show you a simple example in which I use AJAX with JSON, jQuery, PHP and MySQL. It's a product list when you select one, it makes an ajax request to retrieve the data from a database and display them on screen. See live example clicking here To create this example we will need: database, index.php, ...

Example code Captcha with PHP and GD Library

captcha

In this tutorial I'll teach you how to make a captcha with php using GD Graphics Library. See live example clicking here To create our captcha we will need: captcha.php index.php and arial.ttf (font) Step 1 - captcha.php <?php session_start(); header("Content-type: image/jpeg"); $code = generateCode(); $fonts = str_split($code); $img = imagecreatetruecolor(300,120); $color=imagecolorallocate($img,rand(0,255),rand(0,255),rand(0,255)); imagefill($img,0,0,$color); $fontColor=imagecolorallocate($img,255,255,255); $font ="arial.ttf"; for($i=0;$i<sizeof($fonts);$i++){ imagefttext($img,30,rand(-20,15),12*$i*2+35,45,$fontColor,$font,$fonts[$i]); } imagejpeg($img); imagedestroy($img); $_SESSION['captcha']=$code; function generateCode(){ $cod1 = ""; $i = 0; while($i<2){ $cod1.=chr(rand(48,57));; $cod1.=chr(rand(65,90));; $cod1.=chr(rand(97,122));; $i++; } return $cod1; } ?> In this file we create an ...

Chessboard with PHP, HTML and CSS

chessborad php

In this small code, I'll teach you how to create a chessboard in a simple way with PHP, HTML and CSS. Just have to make a table with a loop in php and apply styles. See live example clicking here. Code index.php (without form) <html> <head> <title>Chessboard with PHP, HTML and CSS - Ajax101.com</title> <style> table{ border: solid 1px; } table tr td{ width: 50px; height: 50px; } .black ...

Tutorial Highcharts with MySQL, PHP and AJAX

ajax example

In this tutorial, I will create a chart with highcharts that displays the data retrieved from a mysql database. I will use jQuery, PHP, Ajax and MySQL. See live example clicking here. In this tutorial we will create: database, index.html, data.js and values.php Step 1 - Create database I have already created a new database called "chart" with ...

Tutorial Maps with Google App Script

google maps app script

In the following tutorial with Google App Script and Google Maps I want to place on the map the directions of theme parks that I have saved in a spreadsheet. Something like this: Step 1: Make a spreadsheet in Google Drive I have created a spreadsheet with two columns: "Name" and "Address" Step 2: Give it a name to the ...