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

Looking for serious php developers, I am required to hire a PHP Programmer ...

I am required to hire a PHP Programmer Looking for serious php developers who are available today. Skills required: MVC, eCommerce, MySQL, PHP, Shopping Carts

Developing three-tier web applications, This assignment is intended to prov...

This assignment is intended to provide an introduction to developing 3-tier web applications, with a browser frontend, a database backend, and a server-side script. It requires kn

We need help to modify a web page, We need help to Modify a web page We ...

We need help to Modify a web page We need help to Modify a web page to include posting a new category to our menu including add Add heading as well as text to our current web

Wordpress developer needed for website, WordPress Developer Needed for webs...

WordPress Developer Needed for website We are in search of individuals. I want to be capable to talk to my developer directly. You will be accountable for taking psd files and m

Needed a front-end developer, Front-end Developer As a freelance front-e...

Front-end Developer As a freelance front-end developer, you will be appointed on a per-project basis. You will be accountable for the production, modification and maintenance of

Title tag, The only thing you need to concern yourselves with in the HEAD t...

The only thing you need to concern yourselves with in the HEAD tag (for now) is the TITLE tag. The bulk of the page will be in the BODY tag, as illustrated in Figure.

History object, This is a predefined JavaScript object that is accessible b...

This is a predefined JavaScript object that is accessible by the history property of a window object. The window. history property is array of URL strings that reflect the entries

Develope web app built with php, I have a web app built with PHP//node.js/ ...

I have a web app built with PHP//node.js/ backbone /MySQL/kinetic.js/ jQuery/canvas, and I would like to consult with someone with substantial experience in mobile game development

We need messaging system for buyers as well as sellers, We need Messaging s...

We need Messaging system for buyers as well as sellers Need a messaging system to be implemented as a module into shopping cart system. It would be great if to inactivate the me

Develop an ecommerce website in the optical industry, Develop an ecommerce ...

Develop an ecommerce website in the optical industry that will allow customers to shop for frames upload/order prescriptions and have a shopping cart and pay. Need to look similar

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