Thursday, 21 May 2015

Codeigniter Basic and Imp Thinks

Codeigniter Basic


1. Perfect MVC Architecture
The model, view, controller architecture is nothing new. It seems like all the coding frameworks are MVC now a days, and if they aren’t it can be configured easily. The MVC way of doing things offers nice code separation and keeps things clean. Some frameworks force you to do things by the books but CI lets you use MVC in a way that makes sense you. 

2. Little to no server requirements.
Unlike other PHP frameworks, CI works with both PHP 4 and 5. That makes the lives of someone like me who has to be able to work seamlessly between the two environments much easier.

3. Easy to understand and extend.
CI is the first framework that I used that actually makes sense to me. I was able to get up and running with CI the quickest. CI is also easy to write new libraries, change the behavior of existing libraries and just change the overall behavior of the framework with little effort.

4. All the tools in one little package.
Calendar, e-mail, zip encoding, validation, uploading, sessions, unit testing… that is just a few of the built in libraries that come with CI. It also includes a boat load of default helpers for things like forms, file handling, arrays, strings, cookies, directories and more. Plus, if that wasn’t enough, you can create your own libraries and helpers or use code that has been developed by the CI community.

5. No “installation” necessary.
CI fits this requirement nicely. No need for PEAR packages or server modifications to get the framework up and running. Just upload the files to your server and your off.

6. Built in security tools.
CI allows you to implement as much or as little security as you feel is necessary for your app. It does some things by default like unsetting all global variables regardless of PHPs register_globals directive and turning off the magic_quotes_runtime directive during system initialization so that you don’t have to remove slashes when retrieving data from your database. Other things can be enabled like cookie encryption, handling session data with a database and automatically escaping SQL queries.

7. Database abstraction.
Every decent framework has a database abstraction layer now a days and CI is no exception. You can easily create insert, update and delete statements without needing to write raw SQL. Handle connections to multiple databases within one application

8. Active user community.
There is a nice and big user community to work with when you have a problem or question. The CI website has a forum and wiki when you’re looking for answers. No confusing group mailing lists or chat channels just to get a quick answer to a question.

Sunday, 17 May 2015

Working of Ajax


AJAX

AJAX = Asynchronous JavaScript and XML.
AJAX is a technique for creating fast and dynamic web pages.
AJAX can be used for interactive communication with a database.
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.
Classic web pages, (which do not use AJAX) must reload the entire page if the content should change.


How AJAX Works
ajax working


Validation

Validation :-
Validation is a process of testing and ensuring that the user has entered required and properly formatted information through the web form.

Client-side validation :-
In client-side validation method, all the input validations and error recovery process is carried out on the client side i.e on the user’s browser. It can be done using JavaScript, AJAX, HTML5 etc.

Server-side validation :-
In server-side validation, all the input validations and error recovery process is carried out on the server side. It can be done using programming languages like PHP, VB.NET etc.

Differences and comparison:
Client-side validation is faster than server-side because, the validation takes place on client side (on browser) and the networking time from client to server is saved.
On the other hand, server-side validation is done on the web server. Then the server renders the data into html page and sends back to the client (browser).

Server-side validation is more secure than the client-side as the user cannot see the code even he does a view-source.

Tuesday, 2 September 2014

HTML5 Validation Code

<table border="0" width="530px" style="margin-top:10px;">
      <tr>
      <td>First Name</td>
      </tr>
     
        <tr>
      <td><input type="text" pattern="([a-zA-Z]| |/|\|@|#|$|%|&)+" required="required" name="firstname" class="input_field" placeholder="Enter Your First Name" ></td>
      </tr>
     
            <tr>
      <td>Last Name</td>
      </tr>
     
        <tr>
      <td><input type="text" pattern="([a-zA-Z]| |/|\|@|#|$|%|&)+" required="required" name="lastname" class="input_field" placeholder="Enter Your Last Name" ></td>
      </tr>
     
            <tr>
      <td>Email:</td>
      </tr>
     
        <tr>
      <td><input type="email"  required="required" name="emil" class="input_field" placeholder="Enter Your Email" ></td>
      </tr>
     
     
     
     
       <td>Number</td>
      </tr>
        <tr>
      <td><input type="text" name="contact" required="required" pattern="[789][0-9]{9}"  placeholder="Enter Your No" class="input_field"></td>
      </tr>
       <td>Message</td>
      </tr>
        <tr>
      <td><textarea name="message" cols="30" rows="5" class="required" placeholder="Enter Your Message" required="required"></textarea></td>
      </tr>
      <tr><td>
      <input type="submit" class="submit_btn" name="submit" id="submit" value="submit" />
      <input type="reset" class="submit_btn" name="reset" id="reset" value="Reset" /></td>
      </tr>
      </table>

Monday, 25 August 2014

Hide And Show Function for Javascript

 <script type="text/javascript">
     function hide()
    {
         var elmnt1=document.getElementById('1');
         var elmnt2=document.getElementById('2');
         var elmnt3=document.getElementById('3');
         var elmnt4=document.getElementById('4');
         var elmnt5=document.getElementById('5');
         var elmnt6=document.getElementById('6');
         var elmnt7=document.getElementById('7');
     
        elmnt1.style.display='none';
        elmnt2.style.display='block';
        elmnt3.style.display='none';
        elmnt4.style.display='none';
        elmnt5.style.display='none';
        elmnt6.style.display='none';
        elmnt7.style.display='none';
    }

</script>

Sunday, 24 August 2014

Teachers Paint their minds

Teachers Paint their minds
and guide their thoughts
Share their achievements
and advise their faults

Inspire a Love
of knowledge and truth
As you light the path
Which leads our youth

For our future brightens
with each lesson you teach
Each smile you lengthen
Each goal you help reach

For the dawn of each poet
each philosopher and king
Begins with a Teacher
And the wisdom they bring

                                    for Dhiraj Sir

Sunday, 3 August 2014

* मैंञीची वेल *


एखादी मैंञीची वेल
असावी माझ्या अंगणी,
फुलावे माझे अतंकरण
त्या वेलीकडे पाहुणी .

मैंञीच्या वेलीला पाण्याची
गरज नसावी,
फक्त त्या वेलीला मैंञीची
जान असावी.

उगीचच् नाही फुलत मैंञीची ही वेल
त्यास अंतकरण आपल जोडाव लागत,
मग वटऋषा प्रमाने त्या वेलीला ही ,
लाखो वर्ष जगाव लागत् .

फुलावी मैंञीची ही वेल
माझ्या अंगणी , मला पाहुणी .
न्यावे मला त्यांच्या सोबत,
कोठेतरी वाहुणी.

वाहुण मी त्या वेली सोबत जाईन
फुललेले हे सारे विष्व पाहिण.
फुललेले हे सारे विष्व पाहिण.