Need help again

Spaceship Spaceship
Watch

SiKing

Registered MemberEstablished Member
Impact
6
Hey. Gots a new dilemna. If somebody submits a poem into my database, how can I store it if it's well...long. It currently only stores one half of the poem. I've tried using 'longtext' and 'longblob' but to be honest, I don't understand them.

Also: The user submits the poem by filling in a 'text area' within a form. It then gets sent to the database and then when it's requested, it's displayed as one block of text. ie, no verses.

Click here The situation is shown with a song.

I hope that's clear. Help is very much appreciated!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
LONGTEXT should store really big values O_o

If it's still storing only half of it... it actually may be a problem with outputting it. Are you reading the poem via webpage (PHP) or phpMyAdmin?

Use nl2br($poem); to turn new lines (nl) into (2) breaks (br).

Cheers,
-Matt
 
0
•••
Thanks again for the response. I've checked with both phpMyAdmin and the actual PHP webpage. They both only show half of the poem (~781 characters). Also, where do I put the nl2br() coding. Is it on the output page or as part of the MySQL query (inserting the data into the database)? Thanks

EDIT: Nevermind, the reason it only showed half the poem is because of the "nl2br". Once I inserted that (to the output page), It displayed the whole poem. Thanks a lot !
 
Last edited:
0
•••
Dynadot — .com TransferDynadot — .com Transfer

We're social

Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back