Posts

Simple html css tooltip.

Simple html css tooltip. this is html css tooltip which is faster than jquery or javascript tooltip simple code and paste this code in file and hover on link <!-- css code --> <style>   .tooltip { border-bottom: 1px dotted #000000; color: #000000; outline: none; cursor: pointer; text-decoration: none; position: relative; } .tooltip span { position: absolute; display:none; } .tooltip:hover span { border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); font-family: Calibri, Tahoma, Geneva, sans-serif; position: absolute; left: 1em; top: 2em; z-index: 99; margin-left: 0; width: 250px; display:block; } .tooltip:hover img { border: 0; margin: -10px 0 0 -55px; float: left; position: absolute; display:block; } .toolt

Define DDL and DML in my mysql?

Define DDL, DML commands DDL Data Definition Language (DDL) statements are used to define the database structure or schema. examples are: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed COMMENT - add comments to the data dictionary RENAME - rename an object DML Data Manipulation Language (DML) statements are used for managing data within schema objects. examples are: SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates existing data within a table DELETE - deletes all records from a table, the space for the records remain MERGE - UPSERT operation (insert or update) CALL - call a PL/SQL or Java subprogram EXPLAIN PLAN - explain access path to data LOCK TABLE - control concurrency

How to create custom 404 redirect in codeigniter?

How to create custom 404 redirect in codeigniter? there are lots of post on website which told you about custom 404 redirect in codeigniter but most of them are worth less. Give a minute on this post and you will see this blog give exact what you want. Step first: Create a file in your controller errors.php and paste this code in this file <?php class Errors extends Controller { function Errors() { parent::Controller(); } function error_404() { $this->load->view('error_404'); } } ?> Step Two:  Create a file in your View folder name as error_404.php and write you error msg in this page Step Three: Now opne this file   yoursite/system/core/ Common.php and search this function  show_404() Please note: in many version common.php file in another folder so you can search for this file on this root also  yoursite/core/codeigniter/Common.php A nd replace this code with this function function show_404($page = '') { he

How to submit a form via curl in php?

How to submit a form by curl Lets take and example this is your submit form <form action="website.com/signup" method="post"> <input type="text" name="email" /> <input type="submit" name="submit" value="Submit" /> </form> and you want to submit this form by curl So, Simple copy and paste this in you php file and change field name and form action url and run the file This code will help you submit a form via curl <?php $fields_string =''; $url = 'website.com/signup'; $fields = array( 'EMAIL' => $_POST['email'] ); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL

Why my bootstrap css is not working on mobiles?

Bootstrap css is not working on mobiles when all is fine in your  Bootstrap  html code. and when you open your site on mobile then it shows as  it shows onn your pc. and you still you are frustrate that why  Bootstrap css  is not working. so please check your meta tag did you add this code in of head tag of html <meta name="viewport" content="width=device-width, initial-scale=1.0" />  most of the people when create Bootstrap css the forgot to add this on head tag in html thats why this css not working on mobiles browser so add this code in head tag of html code  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

How to compare two dates via javascript?

How to compare two dates via java-script or how to check two dates that which one is greater and smaller? here is a code where you can check that which date is greater then other or same as vice verse. Simply copy and paste below code in your html file and run the file and change variable according to your need. Note: date format can be in two format one  2012-12-26 00:00:00  or 2012/12/26 00:00:00 Date compare <script> var s_date1 = "2012-12-26 00:00:00"; var en_date1 = "2012-12-26 00:00:00"; var s_date1_new=s_date1.replace(/-/g,"/"); // this line is for if date format is in hyphen like  2013-12-12 00:00:00 var en_date1_new=en_date1.replace(/-/g,"/"); // this line is for if date format is in hyphen like  2013-12-12 00:00:00 var date_ini = new Date(s_date1_new).getTime(); var date_end = new Date(en_date1_new).getTime(); if(isNaN(date_ini)) { alert("Start date format is wrong!"); return false; } if(isNaN(

How to upload a file in php with php validation of extension?

Simply copy and paste this code on your page And your input file name will be uploadedfile Like <input type="file" name="uploadedfile" /> and on submit of this page you will add this code $youruniqueid could be anything like userid or projected on the basis of this it will create folder for image upload $projId=$youruniqueid;    if(!empty($_FILES['uploadedfile']['name'])){     $imgExtension = array("jpg","jpe","jpeg","gif","png","GIF","JPG","JPEG","txt","pdf","PDF","docx","xlsx","pptx","pptm","doc","dot","xls","ppt");         $image_name = pathinfo($_FILES['uploadedfile']['name']);     $extension = strtolower($image_name['extension']);         if(in_array($extension,$imgExtension)){             $file_name = $_FILES['uplo