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

We need a front end developer for responsive site, We need a Front End Deve...

We need a Front End Developer for responsive site In search of a front end developer to put together a responsive template (using Zurb Foundation or alternative) for a modern, s

Html tag, As illustrated in Figure., is a starting tag. To delimit the tex...

As illustrated in Figure., is a starting tag. To delimit the text inside, add closing tag by a "/" to the starting tag. Most but not all tags contains a closing tag. I

Need professional website, Need professional website, backend system with l...

Need professional website, backend system with login and admin panel Project Description: we want someone or a team who are able to assist us in the subsequent, 1) a profe

I need help in completion of blackboard project, I need help in completion ...

I need help in completion of Blackboard Project This is the blackboard project. This is a seven days project. It only needs the designing of few functionalities. Students in ord

We need senior developer experienced in python & django, We need Senior Dev...

We need Senior Developer experienced in Python & Django Company Data aggregation project where we are aggregating online data from multiple sources as well as enabling companies

Need help for telerik controls integration into ie8, Need help for Telerik ...

Need help for Telerik Controls Integration into IE8 We are in search of an experts at integration telerik controls into IE8. We have experienced a few issues as well as we would

Fix custom fields issue in wordpress, Fix Custom Fields Issue in WordPress ...

Fix Custom Fields Issue in WordPress Project Description: I am running into a WordPress problem when I import data using the WP All Import plug-in into custom fields created

We need help to make to improve our website time card, We need help to make...

We need help to make to improve our Website Time Card Our website is built on WordPress. We have up to 100 remote employees who want to submit time cards to us. Presently the

We need to create web chat application, We need to create Web Chat Applicat...

We need to create Web Chat Application Please read project requirements- general info- Its web chat application which supports audio as well as video chat - I do not want

I need help in design corporate website, I need help in Design Corporate We...

I need help in Design Corporate Website Webshop selling "urban" as well as "hip-hop" inspired t-shirt designs. We have a rapid graffiti style logo at the moment and would like h

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