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 to develop personal trainer website, We need help to develop P...

We need help to develop Personal Trainer Website The logo is already done thus the site needs to be designed inline with the logo look and feel. Pages required are- a) Hom

Text box, The tag is used to specify where user input is expected.  It has...

The tag is used to specify where user input is expected.  It has distinct attributes, of which the TYPE attribute is used to indicate the kind of input i.e. to be pro

I need help adding a face book share, FaceBook share On html page (NOT WORD...

FaceBook share On html page (NOT WORD PRESS) I need help adding a face book share The bottom instance is what I need. It needs to pull in title, description as well as image

We are in search of a web developer., Web & wordpress theme : design & deve...

Web & wordpress theme : design & development Expert with php, bootstrap, css and JavaScript. Good with HTML5 will be nice. Able to work with job schedule Job Description- We'

Basic tags of html, Let us now discuss tags in more detail. A command the ...

Let us now discuss tags in more detail. A command the browser to do something. An ATTRIBUTE goes inside the & tells the browser how to do it.  A tag might h

Want help to create a shopping cart, Create a shopping cart I have an in...

Create a shopping cart I have an incomplete shopping cart. The preceding expert didn't finish the project. He has done 70% of the work as well as then sent it to me. I would lik

Expert in backbone.js - jquery and css to update page layout, Expert in bac...

Expert in backbone.js, jQuery and CSS to update page layout and transition effects Project Description: I want an expert in backbone, node, CSS, jQuery and HTML5 to update th

Seeking to create websites and seo, Looking to create websites and SEO (Par...

Looking to create websites and SEO (Partnership) We want a Team of Web Development, Designing as well as SEO for Profit sharing partnership. Please read the full explanation

I want a help in malware check as well as removal, I want a help in Malware...

I want a help in Malware check as well as removal Want a WordPress programmer to check as well as remove possible malware on my website. Not sure what is wrong however I see

Desire a fantasy sports programming, Fantasy Sports Programming I want a...

Fantasy Sports Programming I want a Fantasy sports program like yahoo's fantasy platform. I want my users to be able to create leagues, and have a draft of players. They want to

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