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 in add new content to new page create table, Add new content to ...

Add new content to new page (create table, etc.) We are adding a supplementary service to the business and a need additional page created for site (based off an existing page de

Website programming for a previously designed website, Website programming ...

Website programming for a previously designed website This website is for a clothing and textiles design brand. Job Description - We're looking for a Web Developer. a) The

Adding xml files to html page, Step 1: Select File -> Import XML into Templ...

Step 1: Select File -> Import XML into Template Step 2: Choose the XML file & click Open While an XML file is imported, Dreamweaver merges the XML content in the Template

Web developer and designer required for new site build, Website designer/de...

Website designer/developer needed Web developer/designer required for new site build. Person wants to be confident in design and development, SEO opt, as well as ability to b

Php web services using soap protocol, The developer must have the subsequen...

The developer must have the subsequent: 1. Experience with PHP web services using SOAP protocol 2. Experience using Exchange Web Services and Understanding of Exchange data m

We need help to make to improve our website time card, We need help to make...

We need help to make to improve our Website Time Card Our website is built on WordPress. We have up to 100 remote employees who want to submit time cards to us. Presently the

Dialog boxes in javascript, In this the user cannot switch to the window wi...

In this the user cannot switch to the window without closing the existing window.  This sort of dialog box is referred to as a modal dialog box. You generate a modal dialog box wit

Duplicate of bitcoin and crypto currency exchange, Duplicate of Bitcoin / C...

Duplicate of Bitcoin / Crypto Currency Exchange Duplicate of popular European Bitcoin crypto currency exchange. Will deliver URL via PMB. Must be control panel driven and set

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 web scrapers written, I Need web scrapers WRITTEN I have five sit...

I Need web scrapers WRITTEN I have five sites (very simple) whose web scrapers I need written ASAP. I am seeking for someone who can start IMMEDIATELY as well as work on this fo

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