How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask The-PC-Guy Your Own Question
The-PC-Guy, Software Engineer
Category: Programming
Satisfied Customers: 2146
Experience:  Extensive Knowledge in PHP, MYSQL, CSS & Javascript
Type Your Programming Question Here...
The-PC-Guy is online now

Produce PHP code (and any necessary HTML) to perform the

This answer was rated:



Produce PHP code (and any necessary HTML) to perform the following functions: 1.Using the POST function, retrieve the contents of three HTML text boxes, which should contain floating point values in the range 0.0–10.0. 2.Place the values in an array, and then use a loop to search the array and validate the input. 3.Send a message back to the browser confirming whether the input is valid.


Identify the errors in the PHP code provided for you in assignment6.php (Download ZIP). Correct the code and create comments explaining why the original code would not work properly. Submit the corrected file, complete with comments, as assignment6xxxx.php, where ‘xxxx’ is your name. Remember not to include spaces in file names. The file assignment6.html is provided for you so that it can work with the PHP file. The PHP script will process replies sent from an HTML form in assignment6.html. The HTML file should not contain any errors.
Submit the PHP and HTML files zipped into a single file.

Please find attachment.

My Name is***** will be helping you today. If I provide good service, you may ask forCustomerin your question title for your future needs.

hi this is 2 separate qusetions.

I will do part A for you hear, but will need you to open a new question for part B.

is this ok?
Customer: replied 2 years ago.

Hello Andrew,

thanks for your response, would you be kind to answer both at once i am willing to pay more as bonus. Please I need the answer ASAP. I am already late



ok sending offer now
The-PC-Guy and other Programming Specialists are ready to help you
gr8, i willl get started then
Customer: replied 2 years ago.

can you be ready in next 2 hours ? I expected that you already did the first part. Pleas let me know as time is important.

sure i will try
Customer: replied 2 years ago.

ok now is 11:22 I will check back at 1:22 according to this chat room timing.

is there a pasword on the zip file?
never mind

i got it
Customer: replied 2 years ago.

no there is no password. fyi the zip folder is for question B

this is done let me know if there are any questions
Customer: replied 2 years ago.

wow nice i am checking the output now

Customer: replied 2 years ago.

on question A i got this response below as output and for question B I recieved blank page as output. and i entered float value which was more than the range specified but no validation was there to check value consistency. please fix and let me know

i use internet explorer 11.

if (isset($_POST['submit'])) { //check if form submitted

foreach($_POST as $key => $value) { //loop through post array
if ($key != "submit") {
if ( (is_numeric($value)) and ($value >= 0.0) and ($value <= 10.0) ) { //check for validity
echo "<font color=\"green\">$key is valid</font><br>";
} else {
echo "<font color=\"red\">$key is invalid</font><br>";
} //end if
} //end if
} //end foreach
} //end if


Customer: replied 2 years ago.

Please respond, I will not pay if the code does not work as it should.

Customer: replied 2 years ago.
Relist: Inaccurate answer.
the codes did not produce any meaningful output
it does workyou dont have php on your computer upload to a computer that has php

set up sample.

all you have to do to get it to work is upload to a webhost
Customer: replied 2 years ago.

<br />
<b>Parse error</b>: syntax error, unexpected '<' in <b>[...][...]</b> on line <b>1</b><br />

Customer: replied 2 years ago.

I tested it online and here is the error

<br />
<b>Parse error</b>: syntax error, unexpected '<' in <b>[...][...]</b> on line <b>1</b><br />

how did you test it exactly?
Customer: replied 2 years ago.

I copied the php code and pasted on the link below

that wont work because remeber you need the html file that goes with that. suppose I could put it in a single file if really necesary try the link i gave you
Customer: replied 2 years ago.

that was the first link I tried but it seems to be working now

Customer: replied 2 years ago.

that was the first link I tried but it seems to be working now. I will give you feedback tomorrow

ok, if you need something else lemme know