Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Cant figure out how to solve these errors. Here is my current code: Customer Info
Cant figure out how to solve these errors.
Here is my current code:
'."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 "Information Added"; echo '
'; echo ''; echo "First Name"; echo ' | '; echo ''; echo "Last Name"; echo ' | '; echo ''; echo "Email"; echo ' | '; echo ''; echo "Phone Number"; echo ' | '; echo ''; echo $explodedFix[$i][0]; echo ' | '; echo ''; echo $explodedFix[$i][1]; echo ' | '; echo ''; echo $explodedFix[$i][2]; echo ' | '; echo ''; echo $explodedFix[$i][3]; echo ' | '; echo '
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started