Write the php script to output the session contents, PHP Web Programming

Assignment Help:

Question:

(a) A website wishes to use sessions to store the user's name and display a welcome message on all its pages. The user enters his username in a textbox called "username".

(i) Write the PHP script to create the session and store the user's name in that session.

(ii) Write the PHP script to output the session contents to the user only if the session exists and it is not empty.

(b) Write the PHP script that allows you to:

(i) Create a file named "logfile.log" in the same folder.

(ii) Insert the text "Monday 12 Oct" in this file.

(c) A website wishes to store user complaints in a database. The user enters his comments in a textarea called "complaints" and the form uses the POST method.

Write the PHP script to retrieve and clean up the user input before it can be safely stored in the database and explain your code.

(d) Outline the md5() function and provide an example of a situation where it is necessary to use the md5() function.


Related Discussions:- Write the php script to output the session contents

We need help in user friendly room renting website, We need help in User fr...

We need help in User friendly room renting website a) I need to develop a site similar to spareroom.co.uk in u reply include 1) site u have similar like my refer remember to inc

Prepare a marketplace which will be dedicated to handicrafts, We aim to pre...

We aim to prepare a MarketPLace which will be dedicated to handicrafts. The concept is to provide artists the ability to sell their products via a MarketPlace similar to etsy or ar

Phpbb modifications for course type forum, PHPBB modifications (course type...

PHPBB modifications (course type forum) I want to create a different view/organization of the viewForum.php for my phpBB site. To support this change several changes needs to

We are looking for concrete 5 developer, We are looking for Concrete 5 Deve...

We are looking for Concrete 5 Developer We are seeking someone to partner with your support our small business clients with developing websites using a CMS platform, preferably

Drupal flow of information among 5 main layers, Explain drupal flow Mainly...

Explain drupal flow Mainly, there are 5 important layers in Drupal where information flows, a. Data (Node, ETC) b. Modules c. Blocks and Menus d. User Permissions e. Template a.

I want html/css/js of a new website from design files, I want HTML/CSS/JS o...

I want HTML/CSS/JS of a new website from design files I have several artwork that I created to my company's new website however we are really busy here right now as well as we w

Website development fo responsive site, Website Development We have a st...

Website Development We have a static website that we would willing to change to a responsive wordpress site. We would willing a quote for design of the mobile versions based

I need help in wordpress customized theme takeover, I need help in Wordpres...

I need help in Wordpress Customized Theme Takeover I want someone to step in and takeover a custom shopping cart creation that was made in a wordpress theme. My developer is no

Session layer of osi model, Session layer: the major functions of this lay...

Session layer: the major functions of this layer are to establish, maintain & synchronize the interaction among two communication hosts. It ensures that once a session is establis

We need help for simple php online ordering system, We need help for Simple...

We need help for Simple php online ordering system I need a basic online ordering system for restaurant which is very user friendly, both client side as well as back panel. It m

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd