code ignitor - Learn ExtJS, CodeIgniter and MySQL integration now

Learn ExtJS, CodeIgniter and MySQL integration now

Posted on

code ignitor - Learn ExtJS, CodeIgniter and MySQL integration now

Thought I’m a hardcore java/j2ee developer by compassion however I all the time discover different programming languages. Certainly one of My favourite Net scripting language is PHP and I like PHP due to its simplicity and its many OpenSource MVC frameworks.

So I’ve determined to make use of ExtJS, Code Igniter and MySQL at present to show how we are able to use ExtJS as a Frond finish java script library to connect with Code Igniter PHP framework.

First let write CodeIgnitor view which embrace ExtJS library and show Extjs kind.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

<html>
<head>
<meta httpequiv=“Content material-Sort” content material=“textual content/html; charset=iso-8859-1” />
<title>ExtJS CodeIgniter Tutorial</title>
<hyperlink rel=“stylesheet” kind=“textual content/css” href= echo base_url(); ?>extjs/assets/css/ext-all.css”>
physique {margin-left: 20px;margin-top:20px;}
h2{font-size:14px;shade:crimson;}
.field {margin-top:10px;}
p {margin-top:5px;}
.fabold {font-family:arial;font-weight:daring;}

</head>
<physique>
  <h2>ExtJS CodeIgniter MySQL Tutorial</h2>
  <p>Go to echo anchor(‘http://www.techzoo.org’,‘Tech Zoo’); ?> for Extra Tutorials</p>
  <div id=“output” class=“field”></div>
</physique>
</html>

Now create ExtJS kind which seize consumer particulars and ship to CodeIgniter Controller, and show response coming from Controller in a MessageBox.

The CodeIgniter controller will look just like following…

As you’ll be able to see in CodeIgniter controller’s auth() operate take username, password as parameter and return a json array as a response to view.

Following picture is a screenshot of output.

user auth - Learn ExtJS, CodeIgniter and MySQL integration now

Completely happy Coding…:)

Supply techzoo.org