database info in forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blade_in_exile
    New Member
    • Aug 2006
    • 12

    database info in forms

    HI all

    i am just wondering if this is at all possible

    i know you can get data from mysql database and display it in a table format

    what i would like to know is if it is possible to show the data in a text field so i could then change the data and submit it back to the database.

    thanks in advance
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Yes, just write it as the value of a text input or textarea and you will be able to edit it. You will need some more serverside script to write it back to the MySQL database.

    Comment

    • blade_in_exile
      New Member
      • Aug 2006
      • 12

      #3
      i have tried putting it in where i think is the right place but i get a prse error
      Code:
      echo " <tr>
      <td align=\"center\">{$row['dr']}</td>
      <td align=\"center\">{$row['game']}</td>
      <td align=\"center\">{$row['time']}</td>
      <td align=\"center\">{$row['Channel']}</td>
      <td align=\"center\">{$row['home_score']}</td>
      <td align=\"center\"><input type="text" name="as" size="30" value="<?php echo {$row['away_score']}; ?>" /></td>
      </tr>\n";
      can anyone help
      the error i am getting is:
      parse error: parse error, unexpected T_STRING, expecting ',' or ':' in the "file name" on line 87

      the long line is 87

      any help would be greatly appriciated

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        You got confused, you where already inside an echo statement when suddenly you stop escaping " and issue another echo command on that line.

        Comment

        • blade_in_exile
          New Member
          • Aug 2006
          • 12

          #5
          thanks for replying so quickly

          so how do i get around this problem???

          do i stop the first echo statement before the line??

          Comment

          Working...