putting variable data into a form field<

liunx

Guest
quick question I want to take data stored in a variable and place it into a text field in a form. How would I go about doing that????<input type="text" name="name" value="<?php echo $var; ?>" />

like that?ok so what if I am calling on a function like this:

$loc = 'cust_prem';
if ($_POST['get']) {
$feedback = get_data();

$feedback_str = "<P class=\"error\">$feedback;</p>";
} else {
$feedback_str = '';
}

and the variable is inside the function??? Cause I am calling on it the way u said but nothing is showing up....I'm not sure, i think you have to do something with the variable scope..maybe somebody else will know :/
 
Back
Top