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 php help to fix oscommerce attribute price problem, Need help to Fix o...

Need help to Fix oscommerce attribute price problem I want the customer to be able to choose a quantity of any product on my oscommerce website. For example a product cost $10.

I need help to make a clone of website, I need help to make a Clone of webs...

I need help to make a Clone of website - Database and web programming a) Change to the subject matter b) A beautiful design, c) A certification program (Users will upload

We need assistance in responsive website design and html, We need assistanc...

We need assistance in Responsive Website Design and HTML We run an existing technology website as well as we now need someone to re-design it for us as well as write the respons

I need snell program, We sell products but now need a program prepared that...

We sell products but now need a program prepared that will take clients serial numbers from products purchased and link it to our website or stand alone software and it alerts clie

Packet switching, End systems are linked together through communication lin...

End systems are linked together through communication links. There are several types of communication links that are made of distinct types of physical media, by including fiber op

Html headers, These are used to indicate the headings of sections or sub-se...

These are used to indicate the headings of sections or sub-sections in document. Based on the desired size of the text, any of six obtainable levels ( to ) of h

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.

Implement wordpress design in my existing site, Implement wordpress design ...

Implement wordpress design in my existing site Project Description: Hello i want a design for my current website. This WordPress design require implement Skills requ

Need wordpress expert with responsive design experience, Need WordPress exp...

Need WordPress expert with Responsive design experience for "Customizr" theme We want help from a Wordpress guru who can repair bugs with WP Customizr theme [CSS PHP code errors

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