Jump to content

DonGatuna

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by DonGatuna

  1. Assist a newbie! I would like to create a function for text input and text area. I have the following code that generates the text field but it isn't sticky. <?php function create_text_field ($label, $name, $value){ echo '<label>'.$label .': </label>'; echo '<input type = "text" name ="'.$name.'" value = "'.$value.'"'; if(isset($_POST[$name])&&($_POST[$name]==$value)){ echo $_POST[$name]; } echo '/><br><br>'; } ?> The data doesn't stick... Please note that the value attribute code is inside <?php?> tags. I want to create a function that creates text field(s) that is (are) sticky I cannot place a php tag in the value attribute (since it is part of function statements) Please comment
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.