Experiment No. - 1: Design PHP Based Web Pages Using Correct PHP, CSS, and XHTML Syntax, Structure
Experiment No. - 1: Design PHP Based Web Pages Using Correct PHP, CSS, and XHTML Syntax, Structure
– 1
Design PHP based web pages using correct PHP , CSS , and XHTML
syntax , structure .
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Just a test website for learning html , css and php">
</head>
<body>
<header>
<nav id="main-navigation">
<ul>
<li><a href="index.php">home</a></li>
</ul>
</nav>
</header>
<div id ="main-contents">
</div>
<footer>
contact us at cms@co-in
</footer>
</body>
</html>
Experiment No. – 2
To store a cookie using PHP on client side .
Example for StoreCookie(setcookie())
In the example of setcookie() function the name of cookie is
set as ‘cookie_name’ . The value of cookie is set as
‘cookie_value’ . The expiry of cookie is till 1 day
[(60(sec)*60(min)*24(hour)] .
Here , the ‘path’ , ‘security’ , ‘domain’ is default set in
setcookie().
source code :
<?php
?>
<!DOCTYPE html>
<html lang="en">
<body>
<?php
?>
</body>
</html>
</pre>
Output :
cookie is set.
Experiment No. – 3
To save the user session on server side .
Accessing Session Value
When we need to access session value firstly we call session_start()function .
Here we can access on any php page . Accessing session value through key .
<!DOCTYPE html>
<html>
<body>
<?php
echo $_SESSION["name"];
?>
</body>
</html>
Output
Rakesh
Source code :
<?php
session_start();
?>
Output :
name = Rakesh
Experiment No. – 4
Design website using WordPress
Steps
1. Find a domain name for your site.
2. Sign up for web hosting (we recommend Bluehost) .
3. Get WordPress installed via the Bluehost interface .
4. Pick a free WordPress theme from the Bluehoston Boarding.
5. Get some must-have WordPress plugins that will help with your site
growth .
6. Start creating your pages and blog posts .
Experiment No. – 5
Creation of basic Blogging website
How to start a Blog in 6 steps
1. Pick a blog name . Choose a descriptive name for your blog.
2. Get your blog online . Register your blog and get hosting.
3. Customize your blog . Choose a free blog design template and tweak it .
4. Write and publish your first post…
5. Promote your blog .
6. Make money blogging .
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>title</title>
</head>
<body>
<div id="container">
<header role="banner">
<h1>
<a href="/">joel sutherland</a>
</h1>
</header>
<nav>
<ul><!--nav items --></ul>
</nav>
<div id="blog" class="hidden"><!--blog dropdown--></div>
</div>
<!--blog-->
<article>
<header>
<h1>
<a href="">post title</a>
</h1>
<div class="postmeta">
<time datetime="">December 31st , 1969</time>
<a href="y#comments" class="comments">0 comments</a>
</div>
</header>
<!--content-->
<aside class="comments" id="comments"><!--comments--></aside>
<!--comments-->
</article>
</div>
<!--comments-->
<!--scripts-->
</body>
</html>