Create a connection string to connect to database, PHP Web Programming

Assignment Help:

Question:

(a) What will be the output of the following extract codes? Describe fully how the program operates.

< ?php
$states_of_the_USA = array (1 => "Alabama", "Alaska", "Arizona");
$x = array_count_values($states_of_the_USA);
for ($counter=1; $counter<$x; $counter++) {
echo"
$states_of_the_USA[$counter]";
}
?>

(b) From a Web Browser and a Web Server viewpoint, explain the main processes that occur when a user request a page using PHP script to retrieve MySQL database data for inclusion in a Web Page?

(c) Consider a server with the following settings:

hostname: myserver.com
database name: monthsDB
username: root
password: my$ql

Create a connection string to connect to this database and explain each line of code.

(d) Referring to Question (c), list the PHP statements necessary to:

(i) insert a record into a database table called monthsTable having attributes month_name and number_of_days

(ii) update the existing number of days for the month of February from 28 to 29.


Related Discussions:- Create a connection string to connect to database

Need help to create amazon affiliat store, Amazon Affiliat Store I need ...

Amazon Affiliat Store I need your services to build me an Amazon Affiliate Webstore (for Health as well as Personal Care Products). Script must import inventory from amazon. Int

We need a team of web expert, We need a team of web expert I will get to...

We need a team of web expert I will get to the point. A website is completed as well as hosted under a VPS and the code is written in python. Here's what I am in search of- 1

Html physical style tags, 1. Describe HTML Physical style tags & Logical st...

1. Describe HTML Physical style tags & Logical style tags? 2. Which HTML tag let you to scroll text onto the Web page? 3. Described comment tag in HTML? 4. Develop an HTML

I need a continuing education website, I need a Continuing Education Websit...

I need a Continuing Education Website Please see attached PDF for job specifications. We will be selecting a freelancer within the next week if one meets our needs and budget. T

Shopping Cart, Shopping Cart Purpose – Allows user to browse while keeping ...

Shopping Cart Purpose – Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for al

I need help to make drupal website for rent apartments, I have a website I ...

I have a website I build it with Drupal for Rent apartments and I have five buildings in different places and every building have different capacity of apartments and different apa

Design a simple e-commerce website, The objective of the term project is to...

The objective of the term project is to build a simple E-commerce website by integrating client and server scripting. The website you designed should be published online (student.c

Need help in directorypress customisation, Directorypress customisation ...

Directorypress customisation I need the following done- a) Styling changes for header b) Advanced search customisation (add location search and more) Desired Skills are

Website creation and scraping, I have a three stage project related to prep...

I have a three stage project related to preparing a website: 1) Scraping data from few websites. I will identify which ones and which data once your selected. 2) Modifying th

Session management, I need help with adding session management to my login ...

I need help with adding session management to my login webpage. It is the MVC method and has 2 models and 1 view alongside the login page of course. I just need assistance with the

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