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 in wordpress site with e-commerce integration, WordPress Site wit...

WordPress Site with E-Commerce Integration We want development of a site in Word Press. We will offer the designs and the content. We will want you to set up the site and conver

Geoip2 installation assistance, GeoIP2 installation assistance Can someo...

GeoIP2 installation assistance Can someone help us implement Geoip2 on website? We consume GeoIPlite working as we speak, we at present want to update it. Desired Skills a

We are in need programming expert, We are in need Programming expert I w...

We are in need Programming expert I want someone to write codes for an idea I have. To be honest I do not really trust the security of this site to disclose my idea without havi

I need a new full website development, I need a New Full Website Developmen...

I need a New Full Website Development - Product Search site I would like to setup a website that allows users to search for an item across designated retailers as well as return

We need help in advanced map search for real estate, We need help in advanc...

We need help in advanced map search for real estate A search page utilizing MySQL data to find real estate listing in a given set of shapes on the map. Improve listing set using

Need help to create simple html email from jpg file, Create Simple HTML Ema...

Create Simple HTML Email From JPG file I want to convert a jpg file to an html email file. I proposal on using the html in an email via mail chimp. Attached is the image of how

I want to develop a discussion board and classifieds, I want to develop a D...

I want to develop a Discussion Board/Classifieds I'm seeking to create a discussion board/classifieds for the community I live in I do like to know what platform you'd use an

Want help to customize wordpress theme, Customize Wordpress theme I will...

Customize Wordpress theme I will buying theme (unless you own it) a) The theme needs to be customized b) A few hours of light graphic work c) Customizing the sidebar (l

We are looking for high end drupal specialist, We are looking for High End ...

We are looking for High End Drupal Specialist We are seeking to partner with an INDIVIDUAL Drupal expert with experience working on government or large multinational Drupal roll

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