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

Develop website for a liquor distribution company, Need to develop a very i...

Need to develop a very innovative, detailed liquor related website for a liquor distribution company. Job description: -Complete design -live stocks integration -social

Clear sky media llc is in search of web developers, Clear Sky Media LLC ...

Clear Sky Media LLC Clear Sky Media LLC is in search of 10 Web Developers or 10 Companies to become a partner with us in the US. We will take care of marketing as well as sales.

Internet connection, Before we can employ the Internet, we need to gain acc...

Before we can employ the Internet, we need to gain access to it.  This access is attained in one of many ways, which will be discussed in this section. Above all, the Internet is c

I am seeking someone that will build a very similar website, Rap Genius Clo...

Rap Genius Clone I am seeking someone that will build a very similar website as (though the content will be very different). The functionality will pretty much be the similar (u

Frames, Let us understand now how to make frames for web documents. The int...

Let us understand now how to make frames for web documents. The intelligent use of frames can give your pages a cleaner look & make them easier to navigate. The fundamental conc

Performance issues on amazon ec2, I presently host my websites on Amazon EC...

I presently host my websites on Amazon EC2. I seem to be having several performance issues such as longer than expected loading times. My sites build with Wordpress. I use Cl

Interactive music playing website uising html and javascript, Interactive m...

Interactive music playing website uising HTML and Javascript Fundamentally we're looking to recreate (and previously turntable.fm), nevertheless using a third party music servic

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

Format text, You can format text into the Document window through setting p...

You can format text into the Document window through setting properties in the Property inspector. First one, choose the text you desire to format, and then apply the modification.

We are in need of javascript programmer, We are in need of JavaScript progr...

We are in need of JavaScript programmer We want a JavaScript based program to communicate with a digital sensor and memory system via Bluetooth. Programmer must as well be able

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