Showing posts with label web develop PHP-MySQL. Show all posts
Showing posts with label web develop PHP-MySQL. Show all posts

Wednesday, March 2, 2016

sample of Select Product from DB using PHP-MySQL

How to create MSProduct in PHP-MySQL
1. create dbname: product , table : tblproduct , field : id, Pro_name, category, price , Status
2. Configuration config.php
3. how to select some data from tblproduct index.php

Monday, February 15, 2016

CodeIgniter Quest 2015-2016

Midterm Semeter I
Subject :  Web Development with PHP & MySQL
Period : 60 Minutes



I. Choose the correct answer (06 points)
1.    When we create a new Class Page Controller What do we need to use the Extend ?
 CI_Controller         ‚ Model_Controller       ƒ Controller         „ CodeIgniter_Controller
2.      Whic one is the name of page follow Function ?
function index() {
$this->load->view("home","data");
}
 view/home                 ‚ data                                  ƒ index                   „ home
3.      When we create Class Page , View/about.php What is the URL that we should Run ?
 "http://localhost/CodeIgniter/index.php/page/view/about.php"            
‚ "http://localhost/CodeIgniter/index.php/view/page/about"            
ƒ "http://localhost/CodeIgniter/index.php/page/about"             
„ "http://localhost/CodeIgniter/page/about "          
II.                  សំនួរផ្គូរផ្គង
A
B
C
1.       Web Client
2.       Model
3.       Web Server
4.       Web Browser

A.   Process the user Request
B.   Data
C.    processes requests via HTTP
D.   Sending and Receiving data
E.    User Response
1   =   ………..
2   =   ………..
3   =   ………..
4   =   ………..

 

III.             Question  
1.    What are the reason to use CodeIgniter Framework ?
2.    Describe how to Install CodeIgniter in Localhost ?

3.    What is the function of MVC in CodeIgniter Framework? Described by one?

Sunday, August 9, 2015

Form Validation in JavaScript with HTML

Client side form validation usually done with javascript. For the majority of your users, JavaScript form validation will save a lot of time up front, but double-checking the data on the server remains necessary, in case the user has turned JavaScript off.
Form data that typically are checked by a JavaScript could be:

Saturday, August 8, 2015

Sample Select and Edit form in MySQL using PHP

Directory Structure :


1. Create database name registration1 and table tblstudent as code below :

--
-- Table structure for table `tblstudent`
--
drop database if exists registration1;
create database registration1;
use registration1;

DROP TABLE IF EXISTS `tblstudent`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tblstudent` (
  `StudentID` int(5) NOT NULL default '0',
  `FirstName` varchar(20) character set utf8 default NULL,
  `LastName` varchar(20) character set utf8 default NULL,
  `Sex` varchar(5) default NULL,
  `Email` varchar(50) character set utf8 default NULL,
  `Address` varchar(100) character set utf8 default NULL,
  `Subject` varchar(50) default NULL,
  `Sport` varchar(50) default NULL,
  `Fruit` varchar(50) character set utf8 default NULL,
  PRIMARY KEY  (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--------------------------