Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please give a step by step explanation and provide your answers to those instructions. Thanks. After making yourself review-notes from reviewing the lectures, and completing

image text in transcribed

please give a step by step explanation and provide your answers to those instructions. Thanks.

After making yourself review-notes from reviewing the lectures, and completing the textbook reading assignment Type your code and execute them in the following both ways, and get familiar with both enviroments - first, write them in a php file and visit it through your local Apache Web Server (i.e. XAMPP and composing correct localhost URL in web browser) - then, repeat the same code through your interactive shell (or in an online PHP compiler tool) - 1. Practise by repeating those PHP example code in the lectures and textbook - 2. Practise by creating your own creative PHP code 1. Create four(4) php variables named a,b,c,d, and then assign integer, double, boolean, and string values, total of four(4) datatypes, to those four variables respectively 2. Create one(1) php constant named E, and then assign a string value I' m a PHP constant other than a variable to this constant 3. Compose PHP code/statements that print out the values of (i.e. stored in) each of the above five(5) variables\&constant one by one, (in web server and URL). 4. Compose PHP code/statements using introduced built-in functions that print out the datat type of each variable/constant in a sentence. Tips: consider echo statement, gettype function, variable substitute, concatenate operator, ... etc. For example, if number 3 is assigned to PHP variable named a, then the sentence for this variable to print out should be: eg. PHP variable $ a has been assigned a value 3, which is an integer datatype. And, for the constant E, the sentence to print out : eg. : PHP constant E has been assigned the value: I'm a PHP constant other than a variable, which is a string datatype. B. Practise the GET and POST Superglobal Variable - 1. Create web application to practice form, and get/post method. Copy your already created two(2) .html form files from your Lab 1 into your Lab 2 folder, then create two(2) .php files for these two html files correspondingly - Tips: 1. In each php file, use superglobal variables with the name of each form's child element (i.e. "fname", "Iname", and "age") to receive user's filling of first name, last name, and selection of age iespec (notice: different superglobal variables can receive user's filling sent by different methods, "get" or "post") 2. In a php file, assign reach received value to a corresponding php variable. 3. In that php file, compose a sentence to print all three variables: For example, if user had filled the form (html) with first name "Bob", last name "Smith", age selected as "19", then after user clicked the submit botton, it will jump to the php fle and asstay this sentence on the web page: Bob Smith is 19 years old. 4. Attach "?fname=Bob\&iname=Smith\&age =21 " after the URL of the .php file that receives user's information sent by the get method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Make efficient use of your practice time?

Answered: 1 week ago