inserting textarea in DB by php

Discussion in 'Databases' started by gilgalbiblewheel, Dec 5, 2007.

  1. #1
    I use MS Access 2000 and PHP.
    How should the textarea be to be recognized by the insert command?

    <form action="inserttext.php" method="get" onSubmit="">
    
    <button id="" type="submit" value="" />
    PHP:
    <textarea id="2">
    &nbsp;</textarea>
    PHP:
    $query = "INSERT INTO book (ft0, ft1, ft2, ft3, ft4) VALUES ('$FirstName', '$LastName', '$PhoneNumber')";
    PHP:
     
    gilgalbiblewheel, Dec 5, 2007 IP
  2. codesome

    codesome Peon

    Messages:
    98
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hm. Try this:
    HTML:
    
    <form action="inserttext.php" method="POST">
    <textarea id="2" name="textareaname">&nbsp;</textarea>
    <button id="" type="submit"/>
    </form>
    
    PHP:
    PHP:
    
    $textarea=$_POST['textareaname'];
    $query = "INSERT INTO table (textarea) VALUES ('$textarea')";
    
    PHP:
     
    codesome, Dec 6, 2007 IP