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

Cell padding, You will make modify to the cells which contain text. Since y...

You will make modify to the cells which contain text. Since you can see, the text is too close to the edges of the cells. You will add padding to the cells to leave room among the

We are in need of website development, We are need of Website Development ...

We are need of Website Development I want a website developed that can do the following: 1. Google map that can search locations in a certain area. They must be able to searc

Review business needs and completed designs, SEO skills are of paramount im...

SEO skills are of paramount important and expertise in HTML, CSS, Wordpress are critical. Our designs will be provided, we simply require a team to help code the site and employ th

We need help in web development, We need help in Web Development - Ongoi...

We need help in Web Development - Ongoing. WordPress as well as Infusionsoft experience required.

I need help to develop drupal rooms, I need help to develop Drupal Rooms ...

I need help to develop Drupal Rooms I have a website I build it with Drupal for Rent apartments, I have five buildings in different places Every building have different capacity

Protocols and services on internet, To work along with Internet and to use ...

To work along with Internet and to use its facilities we employ certain tools. For instance, Telnet is a tool that is used for logging on remote computers on the Internet. Let us d

How can images be optimized for use on web pages, Question: (a) Write ...

Question: (a) Write the HTML tags for the following text: Software List A. Module 1 • Adobe Illustrator CS3 B. Module 2 • Adobe Photoshop CS3 C. Module 3 • Maya •

Opencart extension and integration with ebay similar site, OpenCart Extensi...

OpenCart Extension and integration with Ebay similar site We want an integration extension among OpenCart and the overstock/deal website Fyndiq.se Required functionality a

We are in need wix app build, We are in need Wix.com app build Build as ...

We are in need Wix.com app build Build as well as launch an app on wix.com to automatically display a catalogue from an xml file sent via an FTP. Desired Skills are MySQL Adm

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