Below are the file and code i have but i am having issue when i put name in fiel
ID: 3833461 • Letter: B
Question
Below are the file and code i have but i am having issue when i put name in field you seen picture above i am not getting same input back (for Example: i put Abby than i get Same out put). I trying to put name from csv file than try to populate data. file when collecting data from csv file. i will past part of csv file at bottom. I need to first Populate the data which belong to each name by the year. Any help will be appreciated. Thanks. ( I am using mongoose and mongodb with Nodejs.
Index.js:
NameSurf.js
Explanation / Answer
<div>
<p>1ST PART - INTERNAL CODE:</p>
<?php
$matcher = $_REQUEST['matcher'];
$file = "00_test_readcsv_records.csv";
$fp = fopen($file, r);
while ($row = fgetcsv($fp, 1000, '#')) {
if ( strtolower($row[0]) == strtolower($matcher) ) {
$firstname = $row[0];
$lastname = $row[1];
$companyname = $row[2];
$intro = $row[3];
break;
}
}
fclose($fp);
?>
<p>2ND PART - PRINT ELEMENTS OF MATCHED RECORD</p>
<?php
echo "<br>First name = " . $firstname;
echo "<br>Last name = " . $lastname;
echo "<br>Company name = " . $companyname;
echo "<br>Introduction = " . $intro;
?>
</div>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.