Quick HTML question

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

GPGrieco

Established Member
Impact
0
I am trying to get a form to submit to a mysql database. I can get the text boxes to submit

Code:
<form action="insert.php" method="post">
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

But I can't figure out how to get a text area to submit

Code:
<textarea rows="20" cols="50"> The cat was playing in the garden. </textarea>

Any help is appriciated. Sorry if this is a stupid question. :-/
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
looks like you are missing the name attribute on the textarea?
 
0
Close
well, I only know basic html, and now that I look at that I see that. Could you give me an example of what the code should look like? I just need a text area that will submit to insert.php
 
0
Close
I think you'll want something like this:

Code:
<form action="insert.php" method="post">
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
Age: <input type="text" name="age" />
Some Text:<textarea name="mytextarea" rows="20" cols="50"></textarea>
<input type="submit" />
</form>

Change "mytextarea" to whatever name is used for the field in insert.php
 
0
Close
Ok, thanks a bunch.

One more question. How would I make everything show what is in the database when you load the page?
 
0
Close
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back