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

View the site files, To see a high-level representation of the structure of...

To see a high-level representation of the structure of a local site, you use Dreamweaver's Site Map view. You can also employ the site map to insert new files to the site, to add,

Wordpress plugin configuration as well as customizations, Wordpress Plugin ...

Wordpress Plugin Configuration as well as Customizations I want help configuring a plugin correctly (Social Review Engine Plugin) in my Wordpress site. The plugin is previously

Set up the site structure, Structuring the Web site is the primary step tow...

Structuring the Web site is the primary step towards developing the corporate Web site. Structuring comprise creating a folder, that includes all our text files , picture files and

Protection against suspicious data, Input values embedded in SQL statements...

Input values embedded in SQL statements should be screened for inappropriate characters that can form the basis so-called SQL Injection attacks, a type of security attack that may

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 small cakephp project, I need Small CakePHP project Project Descr...

I need Small CakePHP project Project Description: I have an existing system built on CakePHP which requires some updates and development as well as some bug fixing. It is a u

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

Need help-cakephp plugin needed to plot charts with nv3d.js, Cakephp plugin...

Cakephp plugin needed to plot charts with nv3d.js I have a database where I have pairs of date times and values. I want a cakephp plugin that permits me to plot them using nv3d.

Need help for matrimonial website on socialengine php, Need help for Matrim...

Need help for Matrimonial Website on SocialEngine PHP We are in the procedure of creating a matrimonial website using the SocialEngine PHP. This site is hypothetical to have all

Networking models, There are two kinds of networking models obtainable: OSI...

There are two kinds of networking models obtainable: OSI reference Model & the TCP/IP Network Model for the design of computer network system. we shall look at these models in this

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