Entering a variable in the VALUE field

Discussion in 'Databases' started by lost, Dec 6, 2005.

  1. #1
    how can i place a variable in the value field.
    For example, if i had the following
    
    <INPUT TYPE="text" NAME="partno" VALUE=""> 
    
    PHP:
    i need to place a variable in the VALUE = "" section. Placing a literal string will work, however if i try to insert $var like this, it doesn't work:
    
    <INPUT TYPE="text" NAME="partno" VALUE="$var"> 
    
    PHP:
    can someone help please
     
    lost, Dec 6, 2005 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try:
    
    <?php 
    print "<INPUT TYPE='text' NAME='partno' VALUE='$var'>"
    ?>
    
    Code (markup):
     
    vectorgraphx, Dec 6, 2005 IP