0% found this document useful (0 votes)
5 views7 pages

PHP Mysql

Uploaded by

Monilal S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

PHP Mysql

Uploaded by

Monilal S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

GOVERNMENT POLYTECHNIC COLLEGE, EZHUKONE

V SEMESTER COMPUTER HARDWARE ENGINEERING

FIRST SERIES EXAMINATION

Web Programming (Max: Marks – 20 )


1. Write any two HTML formatting tags ( 2)
2. What is CSS ? (3)
3. Explain different types of Lists (5)
4. Design an HTML form for student registration ( fields : Register Number, Name , Branch,
Semester) using suitable controls (10)

GOVERNMENT POLYTECHNIC COLLEGE, EZHUKONE


V SEMESTER COMPUTER HARDWARE ENGINEERING

SECOND SERIES EXAMINATION

Web Programming (Max: Marks – 20 )


1. Write any two web servers (2)
2. What is Session ? (3)
3. difference between get and post method in php ? (5)
4. Explain PHP mysql connectivity (10)
1. Write any two HTML formatting tags ( 2)

<b> - Bold text


<strong> - Important text
2. What is CSS ? (3)

What is CSS?
CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper, or in other media
CSS saves a lot of work. It can control the layout of multiple web pages all at once
External stylesheets are stored in CSS files

3. Explain different types of Lists (5)


1. Unordered HTML List
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
2. Ordered HTML List
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
4. Design an HTML form for student registration ( fields : Register Number, Name , Branch,
Semester) using suitable controls (10)

<html>

<body>

<table>

<tr>
<td>Register Number</td>

<td><input type="text"></td>

</tr>

<tr>

<td>Name</td>

<td><input type="text"></td>

</tr>

<tr>

<td>Register Number</td>

<td><input type="text"></td>

</tr>

<tr>

<td>Semester</td>

<td><input type="text"></td>

</tr>

<tr>

<td>Branch</td>

<td><input type="text"></td>

</tr>

<tr>

<td colspan="2"> <input type="submit" value="Register"> </td>

</tr>

</table>

</body>

</html>
1. Write any two web servers (2)
Apache, IIS
2. What is Session ? (3)

PHP session is used to store and pass information from one page to another temporarily.

PHP session_start() function is used to start the session.

3. difference between get and post method in php ? (5)

4. Explain PHP mysql connectivity (10)


Different function used for managing mysql database in PHP
1. mysqli_connect() : function is used to connect with MySQL database
Syntax
resource mysqli_connect (server, username, password,database)
Example :
$con =
mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;,&quot;college&qu
ot;);

2. mysqli_close() : function is used to disconnect with MySQL database


Example :
mysqli_close( $con);

3. mysqli_query() : function is used to execute SQL


Example :
$result = mysqli_query($con, &quot;select * from student&quot;);
mysqli_query($con, &quot;delete from student&quot;);
4. mysqli_fetch_assoc() : function fetches a result row
Example :
while($row = mysqli_fetch_assoc($result)) {
echo $row[“name”];

You might also like