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

How php statement is different from php script, How PHP statement is differ...

How PHP statement is different from PHP script? Difference between PHP script and PHP statement is that statements are set of instructions which tell PHP to perform an action.

I want an api replication required, I want an API Replication required P...

I want an API Replication required Project Description: Want an API expert to aid in application development in regards to API extraction, and injection into other sites, as

Describe the term symbols, Question: 1. What is the name of the progra...

Question: 1. What is the name of the programming /scripting language of Flash? 2. Which HTML tag can be used to insert a Flash movie in a web page? 3. While working wi

Need a cake php developer with good skillet, Require to get some Changes do...

Require to get some Changes done on a Cake PHP Website Project Description: Need a Cake PHP Developer with good skillet and decent command over the Framework. The develope

We need help in woocommerce design & programming adjustments, We need help ...

We need help in Woocommerce Design & Programming Adjustments +mysql Woocommerce & Wordpress Programming should have experience in Woocommerce and Wordpress php programming. A

Need small five page website in wordpress, Small five page website in wordp...

Small five page website in wordpress (PSD I will supply of each page) I want to develop a small website in wordpress with required these tasks. I will source all pages design in

Open system interconnection, An open system is a model which allows any two...

An open system is a model which allows any two distinct systems to communicate regardless of their underlying architecture. The reason of the OSI model is to open communication amo

Need help to debug cs-cart installation, Need help to Debug CS-Cart install...

Need help to Debug CS-Cart installation We have a CS-Cart installed on one of our servers. The site is running as well as everything is working, except for the fact that ther

We need a wordpress theme development with visual composer, We need a Wordp...

We need a Wordpress Theme Development with visual composer We are in search of a WordPress Theme Developer with extraordinary skills on PHP and theme programming to realize a we

Project development including planning, Project development - Planning, Des...

Project development - Planning, Design, Development We essential a company for 3 tasks- A) Brainstorming and improving our website plan. (Mainly our income sources, new produ

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