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 developer for scientific experiment, Scientific Experiment This is ...

Scientific Experiment This is a small project for a scientific experiment connected to a fashion startup. What is required- A Website that describes a promotion campaign f

Complete php and html coding required for new jobs site, Complete php/ html...

Complete php/ html coding required for new jobs site I have subscribed the domain for a new UK jobs site. I really bought a crappy theme for it (can't name here; libel), anyw

Need capable to design any required worpress plugin, Wordpress Web designer...

Wordpress Web designer/Developer with web application development skills Be capable to design any required Worpress plugin, component, modules. We are begin a new USMLE/COMLE

Test links in dreamweaver, In Dreamweaver you cannot test your links; you s...

In Dreamweaver you cannot test your links; you should check your links in a browser to make sure the pages operate as you expect. 1. Press F12 to preview the page in a brow

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 need help for car transports portal, We need help for car transports por...

We need help for car transports portal I am in search of a web programmer who can realize my ideas on web. I need to create a portal for transportation in Europe especially f

Data types, A value, the data assigned to a variable, may contain any sort ...

A value, the data assigned to a variable, may contain any sort of data. Though, JavaScript considers data to fall into many possible types. Based on the type of data, certain opera

We are need of a expert website designer, We are need of a expert Website d...

We are need of a expert Website designer I have a client who is currently looking to redesign their law office website. They already have a website however currently looking to

Need help in excel calculation on website, Excel calculation on website ...

Excel calculation on website I acquired one excel sheet which makes a calculation based on four variables. The goal is to have certain sort of online tool which allows people

Prepare a few custom post types, Looking to prepare a few custom post types...

Looking to prepare a few custom post types, approval processes, user registration types reports/analytics in a custom WordPress application. It's not a rapid job, there's quite

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