Page 1 of 1
Return data to form
Posted: Mon Mar 19, 2007 1:10 pm
by lewmur
I have an embedded PHP script in an HTML form. I can pass the data from the form to the script, but I figure out how to pass the results of the MySQL query back to the form. Displaying the data doesn't help because it has to be available in the form for a VB6 application to retrieve.
Posted: Mon Mar 19, 2007 1:14 pm
by feyd
Set the various value attributes for each field.
Posted: Mon Mar 19, 2007 1:46 pm
by lewmur
feyd wrote:Set the various value attributes for each field.
I don't understand. I have a $result field in the script. It is set by the query but just for simplicity assume it is hardcoded as $result = "Active". Assume three variable were passed to the script, $_POST['name'], $_POST['pass'] and $_POST['status'].
Upon exiting the script and returning to HTML, I want to place the $result in a named textbox. It can be a previously defined box or a new one. Just so long as it contains the word "Active" or whatever $result was set to. How do I do it? Or can I do before exiting the script?
EDIT: I found the solution. I was leaving out the "=" when trying
value = <?=$result?>
Posted: Mon Mar 19, 2007 2:28 pm
by feyd
Tip: avoid short tags as if they were a diseased, highly infectious, foaming-at-the-mouth baboon.