Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cant figure out how to solve these errors. Here is my current code: Customer Info

image text in transcribed

Cant figure out how to solve these errors.

Here is my current code:

Customer Info '."Use only characters A-Z".''; echo ''."".''; } elseif(strlen($lname)>=20 || ctype_alpha(str_replace(' ','',$lname))==0) { echo "Invalid Last Name"; echo '

'."Name must be at most 20 alphabetic characters".'

'; echo '
'."".''; } elseif(strlen($email)'."Email cannot exceed 20 characters".''; echo ''."".''; } elseif(ctype_digit($pNumber)==false) { echo "Invalid Phone Number."; echo '

'."Phone number must contain only numeric characters; No Dashes".'

'; echo '
'."".''; } else { if(file_exists("customerInfo.txt" == 0) || filesize("customerInfo.txt")==0) { $infoWriter = fopen("customerInfo.txt","w"); fwrite($infoWriter,"$lname:$fname:$email:$pNumber".PHP_EOL); fclose($infoWriter); echo '

'; echo "Information Added"; echo '

'; echo '
'."".''; } else { #Writes New Entry to Existing File $infoWriter = fopen("customerInfo.txt","a+"); fwrite($infoWriter,"$lname:$fname:$email:$pNumber".PHP_EOL); fclose($infoWriter); #Stores New File to Array $fileReader = file("customerInfo.txt",FILE_SKIP_EMPTY_LINES); $exploded = array(); for($i=0;$i'."".''; } } echo '

'; echo "Information Added"; echo '

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; for($i=0;$i'; echo ''; echo ''; echo ''; echo ''; echo ''; } Invalid Email Address Email cannot exceed 20 characters Try again? Information Added Notice: Undefined variable: explodedFix in C:lxampplhtdocsMyHomework TestllupdateInfo.php on line 125 Warning: sizeof): Parameter must be an array or an object that implements Countable in C:lxamppihtdocsMyHomeworkTestllupdateInfo.php on line 125 First NameLast Nameail hoe Number
'; echo "First Name"; echo ''; echo "Last Name"; echo ''; echo "Email"; echo ''; echo "Phone Number"; echo '
'; echo $explodedFix[$i][0]; echo ''; echo $explodedFix[$i][1]; echo ''; echo $explodedFix[$i][2]; echo ''; echo $explodedFix[$i][3]; echo '

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

Students also viewed these Databases questions

Question

7. What traps should she avoid?

Answered: 1 week ago

Question

5. What decision-making model would you advocate to this person?

Answered: 1 week ago

Question

6. What data will she need?

Answered: 1 week ago