You are on page 1of 56

1

Industrial Practical Training Report


Submitted in the partial fulfillment of the requirement of the award of degree of BACHELOR OF TECHNOLOGY IN CSE/IT

Submitted To: Mr. sunil Nagpal Head of department CSE/IT

Submitted By: Name: Lakhwinder Singh Branch&Sem:CSE(5th)sem Univ. Roll.No:1180952

Department of CSE/IT BABA FARID COLLEGE OF ENGINEERING AND TECHNOLOGY, BATHINDA.

Certificate from Head of department(HOD)

This is to certify that Lakhwinder Singh class B.tech 5th sem Rollno-1180952 of Baba Farid Collage of Engineering &Technology, affiliated to Punjab Technical University(PTU) for the award of the degree of Becholors of Technology.

To the best of my knowledge, this work has not been submitted in part or full, for publications or to any other University/ Institute for the award of degree.

HOD: Signature.. Name: Mr.Sunil Nagpal

Designation : HOD

Certificate from Internal Guide

This is to certify that the project Realestate is being submitted by Rajveer kaur class B.tech 4th sem Rollno-1180954 of Baba Farid collage of engineering & Technology, affiliated to Punjab Technical University(PTU) for the award of the degree of Becholors of Technology, is a bonafide research work, carried out by him under my supervision.

To the best of our knowledge, this work has not been submitted in part or full, for publications or to any other University/ Institute for the award of degree.

Internal Guide: Name: Miss. Sonia Gupta

ACKNOWLEDGEMENT
We deeply express our sincere thanks to our head of College Mr. sunil Nagpal for

encouraging and allowing us to present our major project work and premises for the partial fulfillment of the requirements. We sincerely express our gratitude to the project guide Miss Sonia Gupta for their benevolent guidance in completing our project titled Job Portal. Their kindness and help have been the source of encouragement for us. We are grateful to Mr.Amandeep Singh (Head of Training & Placement) who gave us constructive helpful support.

Lakhwinder Singh(1180952) CSE(5th sem)

TABLE OF CONTENTS
S.No 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16 17 18 Acknowledgement Table of contents Overview of organization Overview of project Hardware and software requirements Introduction to programming language(php) Advantages of php How php works Developing a web database application MYSQL Various tools used Planning phase Analysis phase Design phase System implementation and Testing Data flow diagram project References Particulars Page No 4 5 6-7 8 9 10 11 12 13 14-15 16-39 40-42 43 44 45-46 47 48-54 55

Overview of Organization
Netmax technologies were established in 2001 in the field of Advance Networking and embedded systems design solutions. Mission : To provide world class professional training and solutions in advance networking, Embedded systems design and career services for IT professionals as well as electronic system designers. Netmax Technologies provides industrial training to B.Tech /MCA / BCA/Diploma students in fields like Embedded systems Robotics PLC and SCADA Automation Technologies, Advance Networking Technologies(CISCO) JAVA development .NET development PHP programming and Web development Red hat (RHCE) and Unbent Administration Microsoft System Administration( MCSE 2003 , MCITP 2008 )

Technology Focus:We specialize in building solutions around the following key technologies Microsoft: As a Microsoft Gold Certified Partner we have demonstrated expertise with Microsoft development tools, back office servers and mobile technologies. Main focus areas are .NET application development, Visual Studio development (VB, VC++, and FoxPro), database applications using SQL Server and Windows Mobile Applications. Java: We work on Java platforms from IBM, BEA and Oracle. We use STRUTS and Portal frameworks for application development. We have substantial expertise in EJB, JMS, JSP, Servlets, JDBC and JSTL technologies. C/C++:

7 We work on writing machine and device interfaces using C/C++ technologies. We have extensive experience in porting enterprise applications on specialized mobile devices like RF controlled bar code guns and mobile data acquisition devices. Mobile: Our mobile solutions development group can develop solutions on Microsoft, Palm and Symbian platforms. Key Alliances:Microsoft Gold Certified Partner for E-Business Solutions

IBM certified ISV Member Oracle Technology Network

Overview of Project
My project of training was in PHP with Mysql as backend and frontend coding in PHP. I have also done HTML, CSS and Javascript. Our Project for 6weeks training was based on RealEstate. This project is based on the property matters. In this you can search properties in various cities according to property type, price range, area etc. Here by creating an account you get feature to advertise your property detail and can edit the same. PHP, a scripting language designed specifically for use on the Web, is our tool for creating dynamic Web pages. Rich in features that make Web design and programming easier, PHP is in use on more than 20 million domains. Its popularity continues to grow, so it must be fulfilling its function pretty well.

PHP: HyperText Preprocessor. In its early development by a guy named Rasmus Lerdorf, it was called Personal Home Page tools. When it developed into a full-blown language, the name was changed to be more inline with its expanded functionality. The PHP languages syntax is similar to the syntax of C.

Hardware & Software Requirements


HARDWARE REQUIREMENTS
The lists of the hardware used currently for the project are: Processor : Intel Pentium dual core CPU RAM: 512 MB HARD DISK DRIVE: 20 GB CD ROM: 42X Floppy Disk Drive: 1.44 Monitor: 17 color Keyboard: Standard 110 keys Mouse: Scroll

SOFTWARE REQUIREMENTS The lists of the software used currently for the project are: Platform: Microsoft Windows 7 Front End: Development: Environment: PHP Back End Database MySQL

10

INTRODUCTION TO PROGRAMMING LANGUAGE

PHP
PHP, a scripting language designed specifically for use on the Web, is our tool for creating dynamic Web pages. Rich in features that make Web design and programming easier, PHP is in use on more than 20 million domains. Its popularity continues to grow, so it must be fulfilling its function pretty well.

PHP stands for

PHP: HyperText Preprocessor. In its early development by a guy named Rasmus Lerdorf, it was called Personal Home Page tools. When it developed into a full-blown language, the name was changed to be more inline with its expanded functionality. The PHP languages syntax is similar to the syntax of C. PHP is actually simpler than because it doesnt use some of the more difficult concepts of C. PHP also doesnt include the low-level programming capabilities of C because PHP is designed to program Web sites and doesnt require those capabilities.PHP is particularly strong in its ability to interact with databases. PHP support every database weve ever heard of (and some we havent). PHP handles connecting to the database and communicating with it.

11

ADVANTAGES OF PHP
The popularity of PHP is growing rapidly because of its many advantages: _ Its fast. Because it is embedded in HTML code, the response time is short. _ Its inexpensive free, in fact. PHP is proof that free lunches do exist and that WE can get more than WE paid for. _ Its easy to use. PHP contains many special features and functions needed to create dynamic Web pages. The PHP language is designed to be included easily in an HTML file. _ It can run on many operating systems. It runs on a variety of operating Systems Windows, Linux, Mac OS, and most varieties of UNIX. _ Technical support is widely available. A large base of users provides free support through e-mail discussion lists. _ Its secure. The user does not see the PHP code. _ Its designed to support databases. PHP includes functionality designed to interact with specific databases. It relieves WE of the need to know the technical details required to communicate with a database.

_ Its customizable. The open source license allows programmers to modify the PHP software, adding or modifying features as needed to fit their own specific environments.

12

How PHP works


PHP is an embedded scripting language when used in Web pages. This means that PHP code is embedded in HTML code. WE use HTML tags to enclose the PHP language that WE embed in our HTML file the same way that WE would use other HTML tags. WE create and edit Web pages containing PHP the same way that WE create and edit regular HTML pages. For example <html> <body> <?php $fname = $_POST["fname"]; $lname = $_POST["lname"]; $uname = $_POST["uname"]; $pwd = $_POST["password"]; $conn = mysql_connect("localhost","root",""); mysql_select_db("db1",$conn); mysql_query("insert into tbl_login values('$fname','$lname','$uname','$pwd')"); mysql_close($conn); print "Record added successfully"; ?> </body> </html>

13

Developing a Web Database Application Using PHP and MySQL

The PHP software works with the Web server. The Web server is the software that delivers Web pages to the world. When we type a URL into our Web browser, we are sending a message to the Web server at that URL, asking it tosend we an HTML file. The Web server responds by sending the requested file. WEr browser reads the HTML file and displays the Web page. In addition, the Web server processes a file when WE click a Web page buttonthat submits a form. When PHP is installed, the Web server is configured to expect certain file extensions to contain PHP language statements. Often the extension is .php or .phtml, but any extension can be used. When the Web server gets a request for a file with the designated extension, it sends the HTML statements. When PHP language statements are processed, only the output is sent by the Web server to the Web browser. The PHP language statements are not included in the output sent to the browser, so the PHP code is secure and transparent to the user. users browser. The browser interprets the statement as HTML code and displays a Web page with one paragraph hello World. The PHP statement is not delivered to the browser, so the user never sees any PHP statements. PHP is not integrated with all Web servers but does work with many of the popular web servers. PHP is developed as a project of the Apache Software Foundation thus, it works best with Apache. PHP also works with Microsoft IIS/PWS, iPlanet (formerly Netscape Enterprise Server), and others. Although PHP works with several Web servers, it works best with Apache. If WE can select or influence the selection of the Web server used in our organization, select Apache. By itself, Apache is a good choice. It is free, open source, stable, and popular. It currently powers more than 60 percent of all Web sites. It runs on Windows, Linux, Mac OS, and most flavors of Unix.

14

MySQL
MySQL is a fast, easy-to-use RDBMS used on many Web sites. Speed was the developers main focus from the beginning. In the interest of speed, they made the decision to offer fewer features than their major competitors (such as Oracle and Sybase). However, even though MySQL is less full-featured than its commercial competitors, it has all the features needed by the majority of database developers. Its easier to install and use than its commercial competitors,and the difference in price is strongly in MySQLs favor. MySQL is developed, marketed, and supported by MySQL AB, which is a Swedish company. The company licenses it in two ways: Open source software: MySQL is available through the GNU GPL (General Public License). MySQL provides two versions of the open source software

15

ADVANTAGES OF MySQL
MySQL is a popular database with Web developers. Its speed and small size make it ideal for a Web site. Add to that the fact that its open source, which means free, and WE have the foundation of its popularity. Here is a rundown of some of its advantages: _ Its fast. The main goal of the folks who developed MySQL was speed. Thus, the software was designed from the beginning with speed in mind. _ Its inexpensive. MySQL is free under the open source GPL license, and the fee for a commercial license is reasonable. _ Its easy to use. WE can build and interact with a MySQL database by using a few simple statements in the SQL language, which is the standard language for communicating with RDBMSs. the lowdown on the SQL language.

16

VARIOUS TOOLS USED


Css(cascading style sheets)
Cascading style sheet enable us to precisely control the formatting of element on our webpages.Html was designed to control the structure of our webpages,such as headings,images,links,paragraphs and tables.style sheets were desined to control the formatting of these elements in far greater detail than the HTML commands allow.styles are the rules that define how the elemenys appear in a webpages such as font and color. Three types of css: 1. Inline(highest priorty) 2. Internal 3. external For example: <html> <head> <link rel="stylesheet" type="text/css" href="sp.css"> </head> <body class="h"> <div class="u"> <div class="a"><b>facebook</b></div> <div><table class="y"><tr><td>Email<br/><input type="email"><br/> <input type="checkbox" name="Remember me">Remember me</input></td> <td>Password<br/><input type="password"><br/> <a class="b" href="sp.html">Forget Password?</a></td> <td><input type="submit" value="Log In" class="j"></td> </tr></table> </div></div> <div class="m"><div class="c"><b>Facebook helps you connect and share with<br/>the people in your life.</b></div> <img class="e" src="fb.png"> <div><table class="d"><tr><td>Sign Up</td></tr> <tr><td>It's free and always will be.<hr width="360px"></td></tr> <tr><td>First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"></td></tr>

17 <tr><td>Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"></td></tr> <tr><td>Your Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="email"></td></tr> <tr><td>Re-enter Email:&nbsp;&nbsp;&nbsp;<input type="email"></td></tr> <tr><td>New Password:&nbsp;&nbsp;&nbsp;<input type="password"></td></tr> <tr><td>I am:&nbsp;&nbsp;&nbsp;<select><option value="select sex">select sex</option> <option value="male">Male</option> <option value="female">Female</option></select></td></tr> </tr> <tr><td>Birthday:&nbsp;&nbsp;&nbsp;<select><option value="Month:">Month:</option> <option value="jan">jan</option> <option value="feb">feb</option> <option value="mar">mar</option> <option value="apr">apr</option> <option value="may">may</option> <option value="jun">jun</option> <option value="jul">jul</option> <option value="aug">aug</option> <option value="sep">sep</option> <option value="oct">oct</option> <option value="nov">nov</option> <option value="dec">dec</option></select> <select><option value="Day:">Day:</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> </select> </body> </div> </html>

18

Facebook page

19

HTML (Hyper Text Markup Language)


What is HTML? HTML is a language for describing web pages.

HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of markup tags HTML uses markup tags to describe web pages

HTML Tags HTML markup tags are usually called HTML tags

HTML tags are keywords surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag Start and end tags are also called opening tags and closing tags.

HTML Documents - Web Pages


HTML documents describe web pages HTML documents contain HTML tags and plain text HTML documents are also called web pages

The purpose of a web browsers (like Internet Explorer) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page: <html> <body> <h1>My First Heading</h1> <p>My first paragraph</p> </body> </html>

20 Example Explained

The The The The

text text text text

between between between between

<html> and </html> describes the web page <body> and </body> is the visible page content <h1> and </h1> is displayed as a heading <p> and </p> is displayed as a paragraph

HTM or HTML Extension? When you save an HTML file, you can use either the .htm or the .html extension. We use .htm in our examples. It is a habit from the past, when the software only allowed three letters in file extensions. With new software it is perfectly safe to use .html.

HTML Headings HTML headings are defined with the <h1> to <h6> tags. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>

HTML Paragraphs HTML paragraphs are defined with the <p> tag. Example <p>This is a paragraph</p> <p>This is another paragraph</p>

HTML Links HTML links are defined with the <a> tag.

21 H1 headings should be used as main headings, followed by H2 headings, and less important H3 headings, and so on.

HTML Comments Comments can be inserted in the HTML code to make it more readable and understandable. Comments are ignored by the browser and not displayed. Comments are written like this: Example <!-- This is a comment --> Note: There is an exclamation point after the opening bracket, but not before the closing bracket.

HTML Tip - How to View HTML Source Have you ever seen a Web page and wondered "Hey! How did they do that?" To find out, click the VIEW option in your browser's toolbar and select SOURCE or PAGE SOURCE. This will open a window that shows you the HTML code of the page.

Examples From This Page Headings This example demonstrates the tags that display headings in an HTML document. Hidden comments This example demonstrates how to insert a hidden comment in the HTML source code.

22 HTML Tag Reference When you lookup W3Schools' tag reference, you will see additional information about tags and their attributes. You will learn more about HTML tag attributes in the next chapters of this tutorial. Tag <html> <body> <h1> to <h6> <!--> HTML Paragraphs Paragraphs are defined with the <p> tag. Example <p>This is a paragraph</p> <p>This is another paragraph</p> Description Defines an HTML document Defines the document's body Defines header 1 to header 6 Defines a comment

HTML Line Breaks Use the <br /> tag if you want a line break (a new line) without starting a new paragraph: Example <p>This is<br />a para<br />graph with line breaks</p> The <br /> tag is an empty tag. It has no end tag like </br>. HTML Rules (Lines) The <hr /> tag is used to create an horizontal rule (line).

23 Example <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p>

HTML Tag Reference When you lookup W3Schools' tag reference, you will see additional information about tags and their attributes. You will learn more about HTML tag attributes in the next chapters of this tutorial. Tag <p> <br /> <hr /> Description Defines a paragraph Inserts a single line break Defines a horizontal rule

This text is bold This text is big This text is italic


This is computer output

This is subscript and

superscript

HTML Formatting Tags HTML uses tags like <b> and <i> for formatting output, like bold or italic text. These HTML tags are called formatting tags. Refer to the bottom of this page for a complete reference.

24 Tables Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc. How it looks in a browser: Heading Another Heading

row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2

Empty Cells in a Table Table cells with no content are not displayed very well in most browsers. <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td></td> </tr> </table> How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1

Ordered Lists An ordered list is also a list of items. The list items are marked with numbers. An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

25 <ol> <li>Coffee</li> <li>Milk</li> </ol> Here is how it looks in a browser: 1. Coffee 2. Milk Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.

Definition Lists A definition list is not a list of items. This is a list of terms and explanation of the terms. A definition list starts with the <dl> tag. Each definition-list term starts with the <dt> tag. Each definition-list definition starts with the <dd> tag. <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> Here is how it looks in a browser: Coffee Black hot drink Milk White cold drink Inside a definition-list definition (the <dd> tag) you can put paragraphs, line breaks, images, links, other lists, etc. Forms A form is an area that can contain form elements.

26 Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form. A form is defined with the <form> tag. <form> <input> <input> </form>

Input The most used form tag is the <input> tag. The type of input is specified with the type attribute. The most commonly used input types are explained below. Text Fields Text fields are used when you want the user to type letters, numbers, etc. in a form. <form> First name: <input type="text" name="firstname"> <br> Last name: <input type="text" name="lastname"> </form> How it looks in a browser: First name: Last name: Note that the form itself is not visible. Also note that in most browsers, the width of the text field is 20 characters by default. Radio Buttons Radio Buttons are used when you want the user to select one of a limited number of choices.

27 <form> <input type="radio" name="sex" value="male"> Male <br> <input type="radio" name="sex" value="female"> Female </form> How it looks in a browser: Male Female Note that only one option can be chosen. Checkboxes Checkboxes are used when you want the user to select one or more options of a limited number of choices. <form> I have a bike: <input type="checkbox" name="vehicle" value="Bike"> <br> I have a car: <input type="checkbox" name="vehicle" value="Car"> <br> I have an airplane: <input type="checkbox" name="vehicle" value="Airplane"> </form>

How it looks in a browser: I have a bike: I have a car: I have an airplane: The Form's Action Attribute and the Submit Button How it looks in a browser: Username:
Submit

28 If you type some characters in the text field above, and click the "Submit" button, the browser will send your input to a page called "html_form_submit.asp". The page will show you the received input.

Java Script
The HTML <script> tag is used to insert a JavaScript into an HTML page. How to Put a JavaScript Into an HTML Page <html> <body> <script type="text/javascript"> document.write("Hello World!"); </script> </body> </html> The code above will produce this output on an HTML page: Hello World! Example Explained To insert a JavaScript into an HTML page, we use the <script> tag. Inside the <script> tag we use the type attribute to define the scripting language. So, the <script type="text/javascript"> and </script> tells where the JavaScript starts and ends: <html> <body> <script type="text/javascript"> ... </script> </body> </html>

29 The word document.write is a standard JavaScript command for writing output to a page. By entering the document.write command between the <script> and </script> tags, the browser will recognize it as a JavaScript command and execute the code line. In this case the browser will write Hello World! to the page: Example <html> <body> <script type="text/javascript"> document.write("Hello World!"); </script> </body> </html> HTML Comments to Handle Simple Browsers Browsers that do not support JavaScript will display JavaScript as page content. To prevent them from doing this, and as a part of the JavaScript standard, the HTML comment tag can be used to "hide" the JavaScript. Just add an HTML comment tag <!-- before the first JavaScript statement, and a --> (end of comment) after the last JavaScript statement. <html> <body> <script type="text/javascript"> <!-document.write("Hello World!"); //--> </script> </body> </html> The two forward slashes at the end of comment line (//) is the JavaScript comment symbol. This prevents JavaScript from executing the --> tag. JavaScripts in the body section will be executed WHILE the page loads. JavaScripts in the head section will be executed when CALLED.

30 Where to Put the JavaScript JavaScripts in a page will be executed immediately while the page loads into the browser. This is not always what we want. Sometimes we want to execute a script when a page loads, other times when a user triggers an event. Scripts in the head section: Scripts to be executed when they are called, or when an event is triggered, go in the head section. When you place a script in To use the external script, point to the .js file in the "src" attribute of the <script> tag: <html> <head> <script type="text/javascript" src="xxx.js"></script> </head> <body> </body> </html> JavaScript is a sequence of statements to be executed by the browser. JavaScript is Case Sensitive Unlike HTML, JavaScript is case sensitive - therefore watch your capitalization closely when you write JavaScript statements, create or call variables, objects and functions. JavaScript Statements A JavaScript statement is a command to the browser. The purpose of the command is to tell the browser what to do. This JavaScript statement tells the browser to write "Hello Dolly" to the web page: document.write("Hello Dolly"); It is normal to add a semicolon at the end of each executable statement. Most people think this is a good programming practice, and most often you will see this in JavaScript examples on the web.

31 The semicolon is optional (according to the JavaScript standard), and the browser is supposed to interpret the end of the line as the end of the statement. Because of this you will often see examples without the semicolon at the end. JavaScript Code JavaScript code (or just JavaScript) is a sequence of JavaScript statements. Each statement is executed by the browser in the sequence they are written. This example will write a header and two paragraphs to a web page: Example <script type="text/javascript"> document.write("<h1>This is a header</h1>"); document.write("<p>This is a paragraph</p>"); document.write("<p>This is another paragraph</p>"); </script> JavaScript Blocks JavaScript statements can be grouped together in blocks. Blocks start with a left curly bracket {, and ends with a right curly bracket }. The purpose of a block is to make the sequence of statements execute together. This example will write a header and two paragraphs to a web page: Example <script type="text/javascript"> { document.write("<h1>This is a header</h1>"); document.write("<p>This is a paragraph</p>"); document.write("<p>This is another paragraph</p>"); } </script> The example above is not very useful. It just demonstrates the use of a block. Normally a block is used to group statements together in a function or in a

32 condition (where a group of statements should be executed if a condition is met). You will learn more about functions and conditions in later chapters. JavaScript comments can be used to make the code more readable. JavaScript Comments Comments can be added to explain the JavaScript, or to make it more readable. JavaScript Multi-Line Comments Multi line comments start with /* and end with */. This example uses a multi line comment to explain the code: <script type="text/javascript"> /* The code below will write one header and two paragraphs */ document.write("<h1>This is a header</h1>"); document.write("<p>This is a paragraph</p>"); document.write("<p>This is another paragraph</p>"); </script>

Using Comments at the End of a Line In this example the comment is placed at the end of a line: <script type="text/javascript"> document.write("Hello"); // This will write "Hello" document.write("Dolly"); // This will write "Dolly" </script> Variables are "containers" for storing information. Do You Remember Algebra From School? Do you remember algebra from school? x=5, y=6, z=x+y

33 Do you remember that a letter (like x) could be used to hold a value (like 5), and that you could use the information above to calculate the value of z to be 11? These letters are called variables, and variables can be used to hold values (x=5) or expressions (z=x+y). Conditional Statements Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this. In JavaScript we have the following conditional statements:

if statement - use this statement if you want to execute some code only if a specified condition is true if...else statement - use this statement if you want to execute some code if the condition is true and another code if the condition is false if...else if....else statement - use this statement if you want to select one of many blocks of code to be executed switch statement - use this statement if you want to select one of many blocks of code to be executed

If Statement You should use the if statement if you want to execute some code only if a specified condition is true. Syntax if (condition) { code to be executed if condition is true } Note that if is written in lowercase letters. Using uppercase letters (IF) will generate a JavaScript error! Example 1 <script type="text/javascript"> //Write a "Good morning" greeting if //the time is less than 10 var d=new Date(); var time=d.getHours(); if (time<10)

34 { document.write("<b>Good morning</b>"); } </script> If...else Statement If you want to execute some code if a condition is true and another code if the condition is not true, use the if....else statement. Syntax if (condition) { code to be executed if condition is true } else { code to be executed if condition is not true } Example <script type="text/javascript"> //If the time is less than 10, //you will get a "Good morning" greeting. //Otherwise you will get a "Good day" greeting. var d = new Date(); var time = d.getHours(); if (time < 10) { document.write("Good morning!"); } else { document.write("Good day!"); } </script> The JavaScript Switch Statement You should use the switch statement if you want to select one of many blocks of code to be executed.

35 Syntax switch(n) { case 1: execute code block 1 break; case 2: execute code block 2 break; default: code to be executed if n is different from case 1 and 2 } This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared with the values for each case in the structure. If there is a match, the block of code associated with that case is executed. Use break to prevent the code from running into the next case automatically. Example <script type="text/javascript"> //You will receive a different greeting based //on what day it is. Note that Sunday=0, //Monday=1, Tuesday=2, etc. var d=new Date(); theDay=d.getDay(); switch (theDay) { case 5: document.write("Finally Friday"); break; case 6: document.write("Super Saturday"); break; case 0: document.write("Sleepy Sunday"); break; default: document.write("I'm looking forward to this weekend!"); } </script>

36 Alert Box An alert box is often used if you want to make sure information comes through to the user. When an alert box pops up, the user will have to click "OK" to proceed. Syntax: alert("sometext"); Confirm Box A confirm box is often used if you want the user to verify or accept something. When a confirm box pops up, the user will have to click either "OK" or "Cancel" to proceed. If the user clicks "OK", the box returns true. If the user clicks "Cancel", the box returns false. Syntax: confirm("sometext"); Prompt Box A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value. If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the box returns null. Syntax: prompt("sometext","defaultvalue");

37 JavaScript Functions To keep the browser from executing a script when the page loads, you can put your script into a function. A function contains code that will be executed by an event or by a call to that function. You may call a function from anywhere within the page (or even from other pages if the function is embedded in an external .js file). Functions can be defined both in the <head> and in the <body> section of a document. However, to assure that the function is read/loaded by the browser before it is called, it could be wise to put it in the <head> section. Example <html> <head> <script type="text/javascript"> function displaymessage() { alert("Hello World!"); } </script> </head> <body> <form> <input type="button" value="Click me!" onclick="displaymessage()" > </form> </body> </html> If the line: alert("Hello world!!") in the example above had not been put within a function, it would have been executed as soon as the line was loaded. Now, the script is not executed before the user hits the button. We have added an onClick event to the button that will execute the function displaymessage() when the button is clicked. You will learn more about JavaScript events in the JS Events chapter. How to Define a Function The syntax for creating a function is: function functionname(var1,var2,...,varX) {

38 some code } var1, var2, etc are variables or values passed into the function. The { and the } defines the start and end of the function. The return Statement The return statement is used to specify the value that is returned from the function. So, functions that are going to return a value must use the return statement. Example The function below should return the product of two numbers (a and b): function prod(a,b) { x=a*b; return x; } When you call the function above, you must pass along two parameters: product=prod(2,3); The returned value from the prod() function is 6, and it will be stored in the variable called product. Events By using JavaScript, we have the ability to create dynamic web pages. Events are actions that can be detected by JavaScript. Every element on a web page has certain events which can trigger JavaScript functions. For example, we can use the onClick event of a button element to indicate that a function will run when a user clicks on the button. We define the events in the HTML tags. Examples of events:

A mouse click

39

A web page or an image loading Mousing over a hot spot on the web page Selecting an input box in an HTML form Submitting an HTML form A keystroke

Note: Events are normally used in combination with functions, and the function will not be executed before the event occurs! For a complete reference of the events recognized by JavaScript, go to our complete Event reference. onload and onUnload The onload and onUnload events are triggered when the user enters or leaves the page. The onload event is often used to check the visitor's browser type and browser version, and load the proper version of the web page based on the information. Both the onload and onUnload events are also often used to deal with cookies that should be set when a user enters or leaves a page. For example, you could have a popup asking for the user's name upon his first arrival to your page. The name is then stored in a cookie. Next time the visitor arrives at your page, you could have another popup saying something like: "Welcome John Doe!". onFocus, onBlur and onChange The onFocus, onBlur and onChange events are often used in combination with validation of form fields. Below is an example of how to use the onChange event. The checkEmail() function will be called whenever the user changes the content of the field: <input type="text" size="30" id="email" onchange="checkEmail()"> onSubmit The onSubmit event is used to validate ALL form fields before submitting it.Below is an example of how to use the onSubmit event. The checkForm() function will be called when the user clicks the submit button in the form.

40

PLANNING PHASE

Problem Recognition A problem is well defined very rarely. It corps out with a vague feeling of somestatements lead to vague conclusions. So the first task is to get more information by interviewing and meeting concerned people. It clarifies how theproblem is felt, how often it occurs, how it affects the business and which departments are suffering with this. This phase consists of the following tasks.

Problem Definition & Initial Investigation This was a preliminary investigation done with a view to have a feel of the working of the proposed system. This phase has been identified the end-user directly involved in the system who were the managers, assistant officer and database administrator, and the development department. By understanding the working of database, its flow and also after conducting meetings and interviews with the concerned persons of the department, a clear idea about the working was obtained. A flexible approach is adapted towards people who are interviewed. Short hand written notes are prepared based on the response of the employees. The interviews are preferably conducted at the work place of the person being interviewed. Detailed investigation is done in order to define the scope of the problem.

41 By the end of this phase, idea as to how the information enters the system, how it is stored, how it is processed, how information changes affects the working of the system and finally the output format required by the end-user was collected. All the information generated from this phase acted as an input to the next phase. Feasibility study. A feasibility study is an evaluation of a proposal designed to determine the difficulty in carrying out a designated task. Generally, a feasibility study precedes technical development and project implementation. A feasibility study is a test of a system proposal according to its workability impact on organization, ability to meet user needs and effective use of resources. The objective of a feasibility study is not to solve a problem but to acquire a sense of its scope. In other words, a feasibility study is an evaluation or analysis of the potential impact of a proposed project. During the study, the problem definition is crystallized and the aspects of the problem to be included in the system are determined. After the initial investigation of system, this helped to have in-depth study of existing system, understanding its strength and weaknesses & requirements for new proposed system. Feasibility study was done in three phases documented below: a) Behavioral feasibility: People are inherently resistant to change and computers have been known to facilitate change. There is always some reluctance among the users against the introduction of new system but they were told that this system would eliminate the unnecessary overhead of database migration and conversion, which presently had to be carried out on daily basis to facilitate transactions between the different departments. The objective this feasibility phase is to take the operational staff into confidence. As the success of a good system depends upon the willingness of the operating staff, they were taken into full confidence that the new proposed system would make their jobs easier, relieve them from the unnecessary overheads and reduce the possibility of errors creeping into the system.

42 b) Economic feasibility: Economic feasibility is the most frequently used method for evaluating the effectiveness of the candidate system. More commonly known as cost\benefit analysis, the procedure is to determine the benefits and savings that are expected from a candidate system and compare them with the costs. If benefits outweigh the costs, then the decision is made to design and implement the system. A cost\benefit analysis was done for the proposed system to evaluate whether it would be b economically viable or not. The organization has in store many machines with high processing power necessary to implement the system. Also the organization has necessary software i.e. Visual Studio, SQL Server etc. or hardware to support the system. Considering the programmer time and the negligible

hardware/software cost required for developing the system, it was found that the benefits in terms of reduced overhead as a result of elimination of the requirement of database migration and conversion was more than the cost. Cost-based study: It is important to identify cost and benefit factors, which can be categorized as follows: 1. Development costs; and 2. Operating costs. This is an analysis of the costs to be incurred in the system and the benefits derivable out of the system. Time-based study: This is an analysis of the time required to achieve a return on investments. The future value of a project is also a factor. c) Technical feasibility: Technical feasibility centers on the existing computer system. (Hardware/software) and to what extent it can support the proposed addition also the organization already has sufficient high-end machines to serve the processing requirements of the proposed system. So there is no need to purchase new software as the organization has necessary software i.e. Visual Studio, SQL Server etc or hardware to support the proposed system.

43

ANALYSIS PHASE
Systems analysis is the study of sets of interacting entities, including computer systems analysis. This field is closely related to operations research. It is also "an explicit formal inquiry carried out to help someone (referred to as the decision maker) identify a better course of action and make a better decision than he might otherwise have made." Analysis is defined as the procedure by which we break down an intellectual or substantial whole into parts so that we can achieve our end goals.

The development of a computer-based information system includes a systems analysis phase which produces or enhances the data model which itself is a precursor to creating or enhancing a database. There are a number of different approaches to system analysis. When a computer-based information system is developed, systems analysis would constitute the following steps: The development of a feasibility study, involving determining whether a project is economically, socially, technologically and organizationally feasible. Conducting fact-finding measures, designed to ascertain the requirements of the system's end-users. These typically span interviews, questionnaires, or visual observations of work on the existing system. Gauging how the end-users would operate the system (in terms of general experience in using computer hardware or software), what the system would be used for etc.

Another view outlines a phased approach to the process. This approach breaks systems analysis into 5 phases: d) Scope definition e) Problem analysis f) Requirements analysis g) Logical design h) Decision analysis

44

DESIGN PHASE
After the analysis phase we have with us the details of the existing system and the requirements of the user for the new system. This phase diverts focus from the problem domain to the solution domain. It acts as a bridge between the requirement phase and its solution. The design phase focuses on the detailed implementation of the system recommended in the feasibility study. Emphasis is on translating performance specifications into design specifications.

The External Design External design consists of conceiving, planning out and specifying the externally observable characteristics of the software product. These characteristics include user displays or user interface forms and the report formats, external data sources and the functional characteristics, performance requirements etc. External design begins during the analysis phase and continues into the design phase.

45

SYSTEM IMPLEMENTATION AND TESTING


Implementation phase of the software development is concerned with translating the design specifications into the source code. After the system has been designed, and arrives the stage of putting it into actual usage known as the implementation of the system. This involves putting up of actual practical usage of the theoretically designed system. The primary goal of implementation is to write the source code and the internal documentation so that conformance of the code to its specifications can easily be verified and so the debugging, modifications and testing are eased. This goal can be achieved by making the source code as clear and as straightforward as possible. Simplicity, Elegance and Clarity are the hallmarks of good programs whereas complexity are indications of inadequate design and misdirected thinking. The system implementation is a fairly complex and expensive task requiring numerous inter-dependent activities. It involves the effort of a number of groups of people: user and the programmers and the computer operating staff etc. This needs a proper planning to carry out the task successfully. Thus it involves the following activities: i) Writing and testing of programs individually

Testing The most important activity at the implementation stage is the system testing with the objective of validating the system against the designed criteria. During the development cycle, user was involved in all the phases that are analysis, design and coding. After each phase the user was asked whether he was satisfied with the output and the desired rectification was done at the moment. During coding, generally bottom up technique is used. Firstly the lower level modules are coded and then they are integrated together. Thus before implementation, it involves the testing of the system. The testing phase involves testing first of separate parts of the system and then finally of the system as a whole. Each independent module is tested first and then the complete system is tested.

46 This is the most important phase of the system development. The user carries out this testing and test data is also prepared by the user to check for all possible combinations of correct data as well as the wrong data that is trapped by the system. So the testing phase consists of the following steps:

Unit testing: In the bottom of coding technique, each module is tested individually. Firstly the module is tested with some test data that covers all the possible paths and then the actual data was fed to check for results.

Integration testing: After all the modules are ready and duly tested, these have to be integrated into the application. This integrated application was again tested first with the test data and then with the actual data.

47

Dataflow Diagram (DFDs)


Real Estate DFD: -

User Register

Real Estate Home Page

Redirect to login.php

MySQL Login Table

If failed User Login

Advertise your Property

You can search your property on Search Property page.

If successful

48

Project
Job Portal

Job Portal is "Property consisting of land and the buildings on it, along with its natural resources such as crops, minerals, or water; immovable property of this nature; an interest vested in this; (also) an item of real property; (more generally) buildings or housing in general. Also: the business of real estate; the profession of buying, selling, or renting land, buildings or housing. Residential real estate The legal arrangement for the right to occupy a dwelling in some countries is known as the housing tenure. Types of housing tenure include owner occupancy, Tenancy, housing cooperative, condominiums (individually parceled properties in a single building), public housing, squatting, and cohousing. The occupants of a residence constitute a household. Residences can be classified by, if, and how they are connected to neighboring residences and land. Different types of housing tenure can be used for the same physical type. For example, connected residents might be owned by a single entity and leased out, or owned separately with an agreement covering the relationship between units and common areas and concerns

49

DATABASE DESIGN A database is an organized mechanism that has the capability of storing information through which a user can retrieve stored information in an effective and efficient manner. The data is the purpose of any database and must be protected.

The database design is a two level process. In the first step, user requirements are gathered together and a database is designed which will meet these requirements as clearly as possible. This step is called Information Level Design and it is taken independent of any individual DBMS. In the second step, this Information level design is transferred into a design for the specific DBMS that will be used to implement the system in question. This step is called Physical Level Design, concerned with the characteristics of the specific DBMS that will be used. A database design runs parallel with the system design. The organization of the data in the database is aimed to achieve the following two major objectives. o Data Integrity o Data independence Normalization is the process of decomposing the attributes in an application, which results in a set of tables with very simple structure. The purpose of normalization is to make tables as simple as possible. Normalization is carried out in this system for the following reasons. To structure the data so that there is no repetition of data , this helps in saving. To permit simple retrieval of data in response to query and report request. To simplify the maintenance of the data through updates, insertions,

50

TABLES STRUCTURE

Table Name: Job Insert Fieldname Post No. of Post Requirement Location Salary Bond Contact Name Contact Number Email Data Type Varchar Integer Integer Varchar Integer Integer Varchar Integer Varchar Length 50 25 10 50 20 20 50 50 50 Key -

Table Name: User Registration Fieldname Username Password Confirm Password Contact Name Contact Number Email City or Pin Gender Skill Varchar Integer Varchar Varchar Varchar Varchar 50 10 50 15 50 50 Data Type Varchar Varchar Varchar Length 50 50 50 Key Primary key -

51 Home Page:

New Job Insert :

52 Job seeker new registration:

Employer New registration:

53

Login Form:

54

Future of Job Portal


Job Portal is a project to Search the Job in Bathinda and nearby cities. At present this website is just for the purpose of training project. In future when well promote our website in various search engines, we can get a number of hits and can earn well from this site. Well be updating our website time to time in order to give users complete package and newer features.

55

56

REFERENCES

1. http://www.google.com 2. http://www.w3schools.com 3. http://www.phpeasystep.com 4. http://www.wordpress.org 5. http://www.phptutorials.info

You might also like