Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7409517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:05:42+00:00 2026-05-29T06:05:42+00:00

I want to create a textbox, which can be edited and shows the text

  • 0

I want to create a textbox, which can be edited and shows the text inside the textbox (hope that makes sense). I’ve managed to get the textbox and I have a submit button and everything. Since, however, I am still in the learning process with php and scripting, I don’t know how I can then make this field show whatever was written. At the moment, whatever I type and submit vanishes when submitted (I know why that is, just not how to get the entered text to save to a txt file on the database or something.) Any help would be greatly appreciated.

This is basically the whole script I have:

<?php

  session_start();

  include_once("include.inc.php");

  incHeader();



  // make sure staff only are here

  newbouncer(2);

   // include forum code
  include_once("forum-code.php");


mysql_query("UPDATE online SET location = 'My Preferences' WHERE userid = '" . $userID . "'") or die(mysql_error());


echo "</span></p> 


    </span>

<center><img src=\"/layout/images/notepad.png\"></center><p>
      ";

?>

<center><form action="/notes.php" method="post">
<textarea name="comments" id="comments" style="width:380px;height:481px; padding:25px ;background:url('http://i686.photobucket.com/albums/vv221/LilyLoganBing/scrollnotes.png'); border:1px #000000">
To-Do's:


</textarea><br>
<input type="submit" value="Submit"></center>

<?php

  incFooter();

  ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:05:43+00:00Added an answer on May 29, 2026 at 6:05 am

    When you submit the form, the text inside the textarea is stored in $_POST['comments'].
    After submission, you can do what ever you like.

    Example how to store it in a MYSQL database. Put this piece of code in your form processing script, the script that will run after the submit button is pressed.

    INSERT INTO comments VALUES('.$_POST['comments'].')
    

    To put the text in your MYSQL db back in te textarea use this:

    $sql = 'SELECT text FROM comments'
       $res = mysql_query($sql);
       $row = mysql_fetch_assoc($res);
    
       <teaxtarea name='comment'>$row['text']</textarea>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a textbox which contents are validated every time the text
I want to create a user control [textbox] which convert all the text in
I'm creating a login page. I want to create ASP.NET TextBox controls that have
I want to create a user control, which can be bound to some data
since I can not markup content inside tags I want to create my own
is there a way in which i could create light grey text that disappears
I am using the Html.TextBox helper to create textboxes. I want to set attributes
I want to create a function that performs a function passed by parameter on
I want to create a simple http proxy server that does some very basic
I want to create a program which calculates how long it will take to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.