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

Nested list, 1. Develop a Web page, indicating an ordered list of the names...

1. Develop a Web page, indicating an ordered list of the names of your five friends. 2. Develop an HTML document with a nested list indicating the content page of any book 3.

Aesthetics in web design, This is a 10-minute presentation on Aesthetics in...

This is a 10-minute presentation on Aesthetics in Web Design as part of Interaction Design Class (Human Factors Course) - This is a Graduate Level Course. The grading criteria are

Formatting tags, Now let us look at some more tags which can be used to for...

Now let us look at some more tags which can be used to format text. These are all given in the example illustrated in Figure  XYZ&l

Jquery animations for website help needed, Finish JQuery Animations for Web...

Finish JQuery Animations for Website I am seeking a resources in the US that can work US hours ASAP to finish a couple JQuery animations for our website. The animations are pret

Hootesuite stream clone need help in this, Hootesuite Stream Clone We ne...

Hootesuite Stream Clone We need for a clone of the 'Streams' tab a) We must be able to add multiple search streams side by side. b) When the page is closed the search stre

I need help of php expert to change in website, I need help of PHP Expert t...

I need help of PHP Expert to change in website We have an existing code base that needs a new programmer asap. Small tasks as well as bigger projects required not looking for a

Need help in wordpress affiliate tracking, Wordpress Affiliate Tracking- Re...

Wordpress Affiliate Tracking- Recurring I am by means of Pay Pal recurring payments on Wordpress. I am having trouble finding as well as setting up the right Wordpress affiliate

I want help in opencart (mijoshop) dev, I want help in Opencart (MijoShop) ...

I want help in Opencart (MijoShop) dev -Bespoke Duty/Vat and shipping We have a client who vends wines which are either purchased to be shipped to the customer (as standard) OR

I need amember membership programs, aMember membership programs aMember ...

aMember membership programs aMember v4 Membership Programs html websites Job Description: I'm seeking a Web Developer experienced with aMember . I just upgraded to aMe

We need help for back-end of laravel framework, We need help for back-end o...

We need help for back-end of Laravel Framework We have a new website/CMS already built on Laravel framework using PHP & AngularJS. We are in need of a freelance programmer to wo

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