Need help retrieving & inserting TEXT data.

Discussion in 'MySQL' started by TheChosenDarkness, Mar 18, 2008.

  1. #1
    I created a way for my registered users to decorate their homepages. However, no matter what I have tried the information will NOT stick to the page. I was told I would have to INSERT that data and then RETRIEVE the data. Which is all fine and dandy. However, I can't seem to get the insertion right or the retrieval right.

    Please help?

    Here is the form I am using:

    <?php
    if(count($_POST) > 0)
    {
    $changepage = $_POST['changepage'];
    // do any extra formatting you need to the string var $changepage here
    // output it back here
    echo " <tt>$changepage</tt> ";
    }
    ?>

    <form action="pasture.php" method="post">
    <TEXTAREA class="text" name="changepage" COLS="80" ROWS="15">


    </textarea>
    <br><input type="submit" value="Change">
    </form>


    What do I need to do to get the information to insert into "pasture" and then retrieve it from "pasture"?

    Also, how do I get the textarea to allow html tags?
     
    TheChosenDarkness, Mar 18, 2008 IP
  2. CreativeClans

    CreativeClans Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What is "pasture"? Is it a table in your database?
    And what exactly is the purpose of this form? What do your users put in the textarea, and what do you want to do with it?
     
    CreativeClans, Mar 20, 2008 IP
  3. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #3
    You need a tutorial which can teach you to insert and retrieve data from mysql. You can find a lot of material on this topic on search engines.
     
    mwasif, Mar 24, 2008 IP