I use PHP to query records from MySQL and then want to display different fields in different text in the form, and update the data.
Want to insert a more complex form, with ECHO is too error-prone, you big God, there is no other way to achieve ah, kneel beg!
Reply to discussion (solution)
Package good one a small function, the face of interface programming is simple.
The form code is statically written in a PHP file, and the PHP code outputs the queried data as a JS object, and then the DOM operation assigns values to the form elements, for example:
Untitled Document
Untitled Document
Dizzy.. I complicate the simple question again. Output large pieces of HTML code can do this:
$ar = Array (' demo ' = ' 111 ', ' test ' = ' 222 '); $html = <<
Well, thank you, man. I also need the answer to this question. hehe
You can consider a template, such as Smarty
PHP code
$ar = Array (' demo ' = ' 111 ', ' test ' = ' 222 ');
$html = <<
Halo. I complicate the simple question again. The output large segment HTML code can do this:
PHP code
$ar = Array (' demo ' = ' 111 ', ' test ' = ' 222 ');
$html = <<
useful posts, helpful