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

I want help in woocommerce theme customization, Woocommerce Theme Customiza...

Woocommerce Theme Customization Hello you will be working on transforming this woocommerce theme Kindly let me know if you are able. You will require to discern woocommerce d

Django developer with geodjango experience, Django Developer with GeoDjango...

Django Developer with GeoDjango Experience In search of Django Developers with GeoDjango experience for an ongoing database project. The system is built however needs extensions

Add multiple layout cells, You will insert three layout cells below the log...

You will insert three layout cells below the logo cell you just created. Later on you will insert the page's navigation buttons in these cells. 1. In the Objects panel, click

Need help in html5 web development, Need help in HTML5 Web development I...

Need help in HTML5 Web development I will want a web developer to 1) Create an interactive html5 page like the drag as well as throw feature in this website. The images ar

We need help to make site similar as youtube, YouTube like video ads We ...

YouTube like video ads We have an current website for video hosting where users can upload the videos (just like a smaller version of YouTube) and its in PHP. We need to setu

We need a back-end programmer, We need a back-end programmer My name is ...

We need a back-end programmer My name is David from the Netherlands as well as I am in the middle want of developing a site with HQ drum tutorials with the option do offer it in

We need magento experts needed, We need magento experts needed I am seek...

We need magento experts needed I am seeking Magento Expert only if you can start from right now and long time for my company in-house project's, If you can customize Magento 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

Application to create product webpages, Must have: HTML should be HTM...

Must have: HTML should be HTML5 and structured accordingly Styling must be CSS3, written in a separate file and linked to the HTML5 document All pages must be converted

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