PHP script.
My database has 3 fields:
id, name, phone.
I need to update the data for 1 record.
On the first page, I request, by an input, the name of the record to change, and a "Search" button to locate the record to be changed.
On the second page I put the 2 fields for editing:
$nome_g1 = isset($_GET["nome"])?$_GET["nome"]:"";
$arma1 = isset($_GET["telefone" ])?$_GET["telefone" ]:"";
I would like the fields to already be populated with the data of the selected record.
Example:
First page I typed "Antonio", and the script found the record with the name "Antonio" and Phone "99999.9999".
2nd page:
Name ...: [Antônio]
Phone: [99999.9999]
Button: [refresh]
The question is: how to appear the data in the fields as soon as it enters the second page, before typing, ie in the line of "input"