Hi,
I am a beginner in this language and I have a text file (test.txt)like this:
Name;Mail;PhoneNumber;
Test1;
[email protected];111-111-1111;
Test2;
[email protected];222-222-2222;
Test3;
[email protected];333-333-3333;
Test4;
[email protected];333-333-3333;
...
I am able to feed a FORM SELECT with this code:
<?
print("<select name='Person'>");
$file = fopen("test.txt", "rt") ;
while(!feof($file))
{
fscanf($file , "%[^;];%[^;];%[^;];", $Name, $Mail, $Phone) ;
print("<option value=$Name>$Name");
}
fclose($file) ;
print("</select>");
?>
Is there's a way that when the user select a name like Test3, it feed other Input on my web page with the rest of data on the same line?
Exemple: If I choos Test3, it will write automatically his email on a Input box on the same line and his phone number in other input box?
Thanks!