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

Need help to fix cs-cart custom printing of tickets, CS-Cart Custom Printin...

CS-Cart Custom Printing of Tickets We have a cart run on CS-Cart. The shopping cart doesn't purchase items however purchases raffle tickets. What I want is after each order is p

Need help in whatsapp web solution, WHATSAPP WEB SOLUTION We are seeking...

WHATSAPP WEB SOLUTION We are seeking a professional company to develop a solution that allows me to send a bulk message for a list of numbers from the web to whatsapp. This s

I need help for magento ecommerce developer, I need help for Magento eComme...

I need help for Magento eCommerce Developer - Art Gallery Site Looking for a highly skilled professional and motivated Magento web developer to help design as well as implement

I need custom t-shirt website, I need Custom T-shirt Website Project Des...

I need Custom T-shirt Website Project Description: Seeking a full-time developer to help custom t-shirt company with multiple projects in the upcoming year. Skills require

I need snell program, We sell products but now need a program prepared that...

We sell products but now need a program prepared that will take clients serial numbers from products purchased and link it to our website or stand alone software and it alerts clie

I want a python and django proficient, RETS MLS Python Solution I want a...

RETS MLS Python Solution I want a Python, Django proficient to take this solution and make sure that I have the most up to date RETS datafeed. a) Set up capability to configu

Create a web page that allow students to use external files, The purpose of...

The purpose of this exericse is to allow students to practice using external files in support of web applications. For this exercise, imagine that the Batty League Flea Market acce

Need help in the data fetching bus operators south america, Need help in th...

Need help in the Data fetching bus operators South America I want to get data fetched from several homepages of Chilean bus operators. I want a table as a result which includes:

We need a wordpress expert for assistance, We need a Wordpress expert for a...

We need a Wordpress expert for assistance We have bring a wordpress site that is too slow. Our programmer says it's for the reason that of the CivicRM program being slow- We

Ordered lists, Lists with numbered items are known as ordered lists.  They ...

Lists with numbered items are known as ordered lists.  They are utilized while the items in the list have a natural order. They can also be utilized when the number of items in the

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