Hello everyone i want to share this little things that i have learn from my friend tutorial and this call "How to insert data in to mysql database with form using code igniter. Assuming you have done all set up and configuration, here is a simple code.
This our Controller "movie.php"
<?php
class cinema extends CI_Controller{
function construct(){
parent::__construct();
}
function main(){
$this->load->view('cinema_view');
}
function showing(){
$this->load->model('cinema_model');
$this->cinema_model->postmovies();
}
}
Under controller (above code) first we construct the class(cinema), then we make a method or function to call the view which is the function main() {$this->load->view('cinema_view');} and this is our form(cinema_view) that dispaly when we run this program.
Next we make also a method or function to call the model which is the function showing()
$this->load->model('cinema_model'); // this ('cinema_model') it is your cinema_model.php
$this->cinema_model->postmovies(); // this postmovies() it is your function from model (see below).
<?php
This our Model "cinema_model.php"
class cinema_model extends CI_Model{
function postmovies(){
$Title=$_POST['title'];
$Genre=$_POST['genre'];
$order = "insert into showing (title,genre) values ('$Title','$Genre')";
$this->db->query($order);
ECHO "CORRECT?";
}
}
Under model (code above) we make a function which is function postmovies() holds all action here..
Let us explain step by step.
$Title=$_POST['title'];
// $Title - is the variable
// $_POST - is the method or action saying post this ['title'];
//['title'] - this is what user input from the form
$order = "insert into showing (title,genre) values ('$Title','$Genre')";
//$order - variable hold the data to be insert
//"insert into showing - command in mysql saying put this data to table showing
//(title,genre) - this is from database column where you want to insert
//values ('$Title','$Genre')"; - this is the variable above holds the data input by the user ['title'];
//$this->db->query($order); - load to the database
This our form "cinema_view.php"
<html>
<body>
<form action="<?php echo base_url().'/index.php/cinema/'?>showing" method="post">
Title<input type="text" name="title"/><br/>
Genre<input type="text" name="genre"/><br/>
</form>
</body>
</html>
Here in cinema_view.php, which is our form and first line represent our URL, also take action when click the SAVE button,
Learning More Fun
About Me
- The Red Writter
- im Jaded..i create this blog to share my little knowledge about what i've been taken from my college life and my greatest frustration in life is to develop my own accounting software..
Wednesday, February 13, 2013
Thursday, September 13, 2012
How to earned $100 to 200$ in two weeks
I weird this thing so i want to share to anyone who's stay at home 24/7 in front of computer. This is a home based part time job. All you need are internet connection. For more info:
http://incomepart.com/
Good Luck!
http://incomepart.com/ ref.php?page=act%2Fref&invcod=1 48605
Good Luck!Thursday, February 16, 2012
The Fundamental Accounting Equation
Asset = Liabilities + Owners Equity
Assets is defined, the economic resources of the company, and include such items as Cash, Accounts Receivable, Inventories, Land, Building and Machinery.
Liabilities is defined, the obligation of the company arising in the course of business, and includes such items as Accounts Payable, Notes Payable, Loans Payable and mortgage.
Owners Equity is the residual or called net asset because it is equal to liabilities minus asset. Some accountants use Stock Holders Equity if it is a corporation and owners equity is for partnership and sole proprietor.
Example
1. Company ABC Inc., brought a machinery on cash Php 800,000.00 January 1, 2012
What would be the journal entry or how to record to the book of ABC company?
Dr. - Debit
Cr. - Credit
To record machinery
Dr. Machinery 800,000.00
Cr. Cash 800,000.00
In this type of transaction only asset here has works, were no affect on liabilities and owners equity so that we called this Exchange of Asset. Were asset is used and also asset in return.
Assets is defined, the economic resources of the company, and include such items as Cash, Accounts Receivable, Inventories, Land, Building and Machinery.
Liabilities is defined, the obligation of the company arising in the course of business, and includes such items as Accounts Payable, Notes Payable, Loans Payable and mortgage.
Owners Equity is the residual or called net asset because it is equal to liabilities minus asset. Some accountants use Stock Holders Equity if it is a corporation and owners equity is for partnership and sole proprietor.
Example
1. Company ABC Inc., brought a machinery on cash Php 800,000.00 January 1, 2012
What would be the journal entry or how to record to the book of ABC company?
Dr. - Debit
Cr. - Credit
To record machinery
Dr. Machinery 800,000.00
Cr. Cash 800,000.00
In this type of transaction only asset here has works, were no affect on liabilities and owners equity so that we called this Exchange of Asset. Were asset is used and also asset in return.
Friday, September 2, 2011
Property, Plant and Equipment
Definition
Property, plant and equipment are tangible asset which are held by entity for use in production or supply of goods and services, for rental to other, for administrative purposes, and are expected to be used during more than one period.
Valuation and Classification
Property, plant and equipment are generally carried at cost less allowance for depreciation. When classified balance sheet is presented, property, plant and equipment should be reflected as non-current asset.
Characteristic for defining property, plant and equipment
1. The property, plant and equipment are tangible asset meaning with physical substance
2. They are use in business, meaning used in production or supply of goods and services, for rental and administrative purposes.
* Property ordinarily not subject to depreciation such as land used as plant site.
* Property subject to depreciation such are building, machinery and equipment.
* Asset that held for sale include land or held for investment are not include in property, plant and equipment
3. They are expected to be used over a period or more than one year.
Depreciation
The process of systematically allocating the cost of property, plant and equipment expense over the period the asset used is depreciation. This process design to match the asset against the revenue generated over the asset life in accordance with the matching principle. It is a process of cost allocation and not valuation.
Depreciation can either be physical or technical. Physical depreciation is due to wear and tear, passage, of time, action of elements, accident or diseases. Technical depreciation arises from obsolescence or inadequacy.
Acquisition mode of new acquired asset (PPE)
1. cash purchase
2. credit purchase or purchase on account
3. installment purchase
4. issuance of securities
5. issuance of bonds payable
There are factors considered in determining amount of depreciation expense to be recognized each period.
* Asset cost
* Estimated useful life - is the estimated length of service expected from an asset. Useful life may be expressed in years, units of output and other measurement.
* Estimated salvage value - it is the expected cash value of asset or the amount that the asset can probably sold for at the end of its estimated useful life. This known also as residual value, scrap value or trade-in value.
Property, plant and equipment are tangible asset which are held by entity for use in production or supply of goods and services, for rental to other, for administrative purposes, and are expected to be used during more than one period.
Valuation and Classification
Property, plant and equipment are generally carried at cost less allowance for depreciation. When classified balance sheet is presented, property, plant and equipment should be reflected as non-current asset.
Characteristic for defining property, plant and equipment
1. The property, plant and equipment are tangible asset meaning with physical substance
2. They are use in business, meaning used in production or supply of goods and services, for rental and administrative purposes.
* Property ordinarily not subject to depreciation such as land used as plant site.
* Property subject to depreciation such are building, machinery and equipment.
* Asset that held for sale include land or held for investment are not include in property, plant and equipment
3. They are expected to be used over a period or more than one year.
Depreciation
The process of systematically allocating the cost of property, plant and equipment expense over the period the asset used is depreciation. This process design to match the asset against the revenue generated over the asset life in accordance with the matching principle. It is a process of cost allocation and not valuation.
Depreciation can either be physical or technical. Physical depreciation is due to wear and tear, passage, of time, action of elements, accident or diseases. Technical depreciation arises from obsolescence or inadequacy.
Acquisition mode of new acquired asset (PPE)
1. cash purchase
2. credit purchase or purchase on account
3. installment purchase
4. issuance of securities
5. issuance of bonds payable
There are factors considered in determining amount of depreciation expense to be recognized each period.
* Asset cost
* Estimated useful life - is the estimated length of service expected from an asset. Useful life may be expressed in years, units of output and other measurement.
* Estimated salvage value - it is the expected cash value of asset or the amount that the asset can probably sold for at the end of its estimated useful life. This known also as residual value, scrap value or trade-in value.
Inventory defintion and cost
Inventories these are asset which are held for sale in the ordinary course of business; in the process of production for such sale or in the form of materials or supplies to be consumed in the production process or in the rendering of services.
Two types of inventories
1. Trading concern inventories is one that buy and sell goods in the same form of purchased. The term "merchandise inventory" generally applied to good held by trading concern.
2. Manufacturing concerned is the buy goods which are transform or converted in another form of goods that made before to sell. The term :"Finished goods" is refer to inventories of a manufacturing concern.
Measurement of cost for inventories
Inventory should be measured at the lower of cost and net realizable value. Net realizable value is the estimated selling price in the ordinary course of business less the cost of completion and the cost necessary to make sale. The cost of inventories should comprise all cost of purchased, cost of conversion and other cost incurred in bring the inventories in to their present location and condition.
Terms in connection with purchase of merchandise or raw materials
1. FOB destination
2. FOB shipping point
3. Freight collect
4. Freight prepaid
Inventory costing methods
Usually business entity are not able to specifically identify the unit sold and the unit remaining. A cost flow assumption must be made. cost flow is a real or assumed associate of units cost with good either sold or on hand. Assumed cost does not always reflect the actual goods flow. The generally accepted methods of inventory costing under the periodic inventory system are follows:
1. Specific identification
2. First in, First out
3. Last in, Last out
4. Weighted average cost
Two types of inventories
1. Trading concern inventories is one that buy and sell goods in the same form of purchased. The term "merchandise inventory" generally applied to good held by trading concern.
2. Manufacturing concerned is the buy goods which are transform or converted in another form of goods that made before to sell. The term :"Finished goods" is refer to inventories of a manufacturing concern.
Measurement of cost for inventories
Inventory should be measured at the lower of cost and net realizable value. Net realizable value is the estimated selling price in the ordinary course of business less the cost of completion and the cost necessary to make sale. The cost of inventories should comprise all cost of purchased, cost of conversion and other cost incurred in bring the inventories in to their present location and condition.
Terms in connection with purchase of merchandise or raw materials
1. FOB destination
2. FOB shipping point
3. Freight collect
4. Freight prepaid
Inventory costing methods
Usually business entity are not able to specifically identify the unit sold and the unit remaining. A cost flow assumption must be made. cost flow is a real or assumed associate of units cost with good either sold or on hand. Assumed cost does not always reflect the actual goods flow. The generally accepted methods of inventory costing under the periodic inventory system are follows:
1. Specific identification
2. First in, First out
3. Last in, Last out
4. Weighted average cost
Monday, August 22, 2011
General Ledger and Subsidiary Ledger
The general ledger, often called simply as the ledger, is a group of many accounts. An account is the accounting device used in summarizing the effect of transaction on each asset, liability, equity, revenue and expense. Simply, each account is a record of information about accounting transaction.Such category
Asset - such as cash, account receivable, merchandise inventory, furniture and fixture, land and building.
Liability - such as accounts payable, notes payable, bonds payable, income tax payable.
Equity - such as common stock, retained earning, treasury stock, paid in capital, revaluation surplus.
Income - such as interest income, gain on sales of asset, rental income and other income.
Expense - such as interest expense, rent expense, communication expense and transportation expense.
Open Space Media Inc
Chart of Accounts
ASSET
Account Code Account Name
0001-001 Cash in Bank
0002-001 Account Receivable
0003-001 Merchandise Inventory
LIABILITY
0005-002 Accounts Payable
0006-002 Notes Payable
0007-002 Bonds Payable
EQUITY
0010-003 Retained Earning
0011-003 Treasury Stock
0012-003 Paid in Capital
INCOME
0020-004 Sales
0020-004 Interest Income
0020-004 Rental Income
EXPENSE
0030-007 Interest Expense
0030-008 Rent Expense
0030-009 Communication Expense
The common used by a particular company are usually expressed in the form called chart of accounts. A chart of accounts is a list of all the company general ledger accounts in systematic form. The accounts usually numbered or called account number to make it series and easy to identify.
in extend to general ledger most company maintain we called subsidiary ledger is the device storing the details of certain general ledger accounts are actually the main account supported the details of Subsidiary Ledger.
Sunday, August 21, 2011
Partnership Liquidation Defined
The process of winding up a business normally consist of conversion of a portion or all of the asset into cash, settlement with creditors, and distribution of remaining assets to the ownership group. The conversion of asset into cash is referred to as realization; the payment of claim is referred to as liquidation. The latter is also used in a broader sense to refer to the complete winding up process.
Upon liquidation of a partnership, the accountant must be able to advise as the proper distribution of asset among individual partners. Improper distribution resulting overpayment to certain parties with corresponding loss to the other, may result in personal liability on the part of person or the one authorizing such distribution.
South West Cross Bank
Case Study: South west cross bank
South West Cross Bank is to taking a radical change in its retail operation in order to provide efficient service to its customers and to improve its current operation. But the problem is with its employees in embracing this change. The new operation process will transfer most of the works that are carried in the branch to a large processing centre and this makes Christina Kusonski, one of the retained employees, feel uneasy with the new banking service set up. According to her sentiments, the new process requires them to be nice to the customers and she feels pressure with this, I think she should not be pressured because being in a service provider, one must be nice and friendly to every customer that they have whether this customer is a huge depositor or not. It’s the customers that give life in a service provider kind of business . For the employee to be confident in dealing wth their customers, the management of South West Cross Bank should organize a training focusing on how to deal with different kind of customers. The employees should also attend a training focusing on the various products and services beng offerred by the Bank. Being knowlegeable with the products and services of the bank, will help the employees to give a better service to their customer. The new process will also require them to on the front desk of the bank from morning to night, maybe this is so tiring and so I think that if employees are all day facing the customers, they should be given shorter number of working hours maybe lower than eight hours for them not to be so exhausted and will still remain good looking in the eyes of the customers.
For the management, it should make sure that its employees understand the new operation and why the bank is doing this – to compete with other banks that were allowing automation in most of their bank activities. Maybe management can also adopt what the company of Silvia Lowener is doing, that is meeting its employees at the beginning of every shift to catch up with them and to hear their arguments if there are any. If regards to the complain of Christina that the new process will make them isolated with their fellow employees, the management can have team bonding every two weeks or once a month for them to mingle with each other and to strengthen their bonds to each other. And the management should listen to its employees’ suggestions to the betterment of their business. Management should also get the feedback of their customers for them to continually improve their service.
Supplying Fast Fashion
UNITED COLOUR OF BENETTON
Almost 50 years in the world of fashion by selling bright and sweater. It is establish by Luciano Benetton and designed by his sister across the Europe and promoted by controversial advertising. Last 2005 UCB group has now in 150 countries through out the world.
I think United Colour of Benetton is the best quality at the best price cloths in the market although less in designed but in terms of quality more customer attract for that. At this particular characteristic of the Benetton product, they more patronizing continuing the growth at its attitude high N level of the product in the market. One more thing to do of Benetton improved the the designed to dominate the market.
H & M
Established in Sweden in 1947, its sells cloths and cosmetics in over 1000 stores in 20 countries around the world. The business concept of H & M was “ Fashion and Quality at the best price”.H & M has 40,000 employee and revenues of SEK 60,000 million in Germany followed by Sweden and UK.
I think for the H & M more fashionable than Benetton product. The H & M more in fashion and quality at the best price.The characteristic of H & M product is at the middle level in the market. Things for the H & M is more ensuring the best price, improving efficient distribution system and be conscious at every stage of this.
ZARA
The first store Zara opened was by accident in 1975 when Amancio Ortega Gaona, a woman pajama manufacturer , was left with a large cancelled order . The shop opened was intended only as an outlet for cancelled order. Now inditex, the holding group that includes the Zara Brand over 1,300 store in 39 countries with annual sales of over 3 billion pound. The Zara accounts for over 75 percent of the group total retail sales and still based in north-west Spain.
I think Zara has three product line for woman, men and children that can dominate the market.Thing for Zara improved quick respond to fluctuating customer demands in fashion trends. Because item move so quickly through zara store, customer feel the pressure to buy an item for fear that it may not longer here next time.
Thesis Format Review
Review of Thesis
For every thesis, there are certain rules, guidelines and format to be followed in order to be successful. Certain steps are strictly implemented to vividly manifest the result shown by the samples or data. Correctness of the result greatly depends on how the blueprint has been structured and to what extent the guidelines are followed. Behavior of the respondents may also be affected, so proper format must be implemented.
Here is the thesis review format outline of some student in Jose Rizal University who is completed their thesis requirement. The title is “Factors Affecting the Reading Interest of the Fourth Year High School Student of Dominican College”. Their Thesis format is start with Title Page which is short (length is 10-12 words); reflective of the content, problem, and the main variables to be studied; free of value judgment; should be written in inverted pyramid boldface, and capital letters. Also include below author’s Name, Month and Year of Completion, and Institutional Affiliation. Approval Sheet this is a letter type at below name with signature of panel of examiners that be mean the requirements is accepted. Acknowledgement is a letter type also like greeting or recognition of someone with connection with the research. Dedication is an inspirational address to someone as a part of research. Biographical Sketch is about to the author personal information. Abstract is a brief, comprehensive summary of the contents of the manuscript or Synthesis of the study which includes the objectives, methodology, highlights of the results, conclusions, and recommendations. Table of Content a list of divisions (chapter or articles) and the pages on which they start. Bibliography - should be alphabetically arranged all the references cited in the text must be included in this section. Examples: Harris, A.B “Science of Behavior” New York: McGraw Hill, Book Co. 1990. Appendix it is a supporting materials for research include instructions to participants; original scales or questionnaires, and raw data; statistical calculations; and instrument used. Examples: Philip C. Colin Successful Writing at Work, Hough Mifflin 2007.After all this be done I though they have a picture of Respondents and its location.
For the format in writing it’s start with capital letter 4 spaces from the title of the page to write the sub title and 2 spaces to start the discussion. Example:
CHAPTER I
INTRODUCTION (title of the page)
(4 spaces)
(4 spaces)
Background of the Study (sub-title of the page)
(2 spaces)
The demand for medicines…. (Discussion)
(3 spaces)
Statement of the Problem
(2 spaces)
The government has been exerting its efforts …
(3 spaces)
Objectives of the Study
(2 spaces)
The study generally aimed to …
(3 spaces)
Subscribe to:
Posts (Atom)