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

Create a code for implement database of a car company, Creating Table cr...

Creating Table create table cars (Vin_num varchar(30),primary key(Vin_Num),Make varchar(15),Model varchar(20),Year int,Price varchar(20)); Inserting Records: insert into cars va

Describe the term symbols, Question: 1. What is the name of the progra...

Question: 1. What is the name of the programming /scripting language of Flash? 2. Which HTML tag can be used to insert a Flash movie in a web page? 3. While working wi

We are need of help in crowdfund5, We are need of help in Crowdfund5 I'm...

We are need of help in Crowdfund5 I'm in search of someone to build clone a site like Realtymogul.com The site is to function the similar on the front and back-end. The fi

Fix php script that works on facebooks api, FIX PHP Script that works on Fa...

FIX PHP Script that works on Facebook's API Project Description: FIX PHP Script that works on Facebook's API: Professionals only Develop a tool with a freelancer that is n

Database authorization, Use a database table Authorization as shown below...

Use a database table Authorization as shown below with appropriate choice of data types .  This table must be populated by you manually using the PhpMyAdmin interface to MySQL.

We need a reasonably simple documentation website, We need a reasonably sim...

We need a reasonably simple documentation website The website will be hosted on a Microsoft SharePoint for in-company use only. The determination of this website is to create

Need a cake php developer with good skillet, Require to get some Changes do...

Require to get some Changes done on a Cake PHP Website Project Description: Need a Cake PHP Developer with good skillet and decent command over the Framework. The develope

Advanced html, In the previous unit you have study the fundamentals of HTML...

In the previous unit you have study the fundamentals of HTML. After study about how to make static web pages, now let us study how to develop Interactive Web sites. A good web site

We need help in online map indicating locations of web page, We need help i...

We need help in online map indicating locations of web page visitors Seeking someone who can program a global map that indicates the locations of visitors for a 24-hour period (

I need help in zend two general updates, I need help in Zend two General Up...

I need help in Zend two General Updates I am in necessity of a few updates which will include working on a form, creating new functions as well as creating a few models in the Z

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