how do i change this code for database edit

Discussion in 'PHP' started by dougvcd, Aug 15, 2007.

  1. #1
    i need to change this field to a text area
    in my reg form i have this

    <strong>Caravan Details:</strong><br>
          <textarea name="caravandetails" cols="40" rows="5"></textarea><br>
          <br/>
    PHP:
    how do i convert that to show on my edit form as text area
    this is what i have at moment

    <input type="text" name="caravandetails" value=<? echo $caravandetails ?>> 
          <strong>Caravan Details:</strong> <br>
          <br/> 
    PHP:
    cheers
    Doug
     
    dougvcd, Aug 15, 2007 IP
  2. THT

    THT Peon

    Messages:
    686
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <strong>Caravan Details:</strong><br>      <textarea name="caravandetails" cols="40" rows="5"><? echo $caravandetails; ?></textarea><br>      <br/>
    
    
    HTML:
     
    THT, Aug 15, 2007 IP
  3. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry that did not work
    cheers
    Doug
     
    dougvcd, Aug 15, 2007 IP
  4. donthate

    donthate Banned

    Messages:
    922
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <textarea name="caravandetails" cols="40" rows="5"> <? echo "$caravandetails"; ?> </textarea><br> <br/>

    This works , just tested.


    If it doesnt, its because:

    $caravandetails isnt set right.

    If the above code doesnt work, try a simple :

    echo "$caravandetails";

    without any text area stuff and see if it says something.
     
    donthate, Aug 15, 2007 IP
  5. dougvcd

    dougvcd Peon

    Messages:
    267
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    cheers buddy works fine
    Doug
     
    dougvcd, Aug 16, 2007 IP
  6. THT

    THT Peon

    Messages:
    686
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    lol its the same as my code!!
     
    THT, Aug 16, 2007 IP
  7. donthate

    donthate Banned

    Messages:
    922
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I know, just the echo is <? echo "$caravandetails"; ?> instead of <? echo $caravandetails ?> although it should still work, but i tried it and it worked so i posted it ;)
     
    donthate, Aug 16, 2007 IP