Beginner to PHP here. I’m designing a small website for an assignment with the goal of matching qualified job seekers with companies. The person looking for a job will fill out a form with their name, phone number, job they are looking for, college major, and the hours they wish to work. This information will be appended to a text file called “applicants.txt”. Companies will fill out the same fields on a seperate page, except with what they are looking for in an employee as oppose to what they are looking for in a job. This information will be appended to a different text file called “jobOpenings.txt”. I have done all of this successfully. What I am now struggling with is writing the PHP code to see if the information submitted by the job seeker matches the information submitted by the company.
Share
For the problem that you posted, your error is in:
list($companyEmployer, $jobEmployer, $majorEmployer, $hoursEmployer) = explode("\t", $line);You are trying to explode the data based on ‘tabs’, while when you save the data, you separate the entries by comma’s. Change
explode("\t", $line)toexplode(",", $line)to correctly read the data in to your variables.