954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

<textarea>

i have a problem in . i dont know how to ask the question. but can give the example what i need

for eg if i want to add
"
The secret of pay per click lies in choosing the right keywords for your potential customers to use when they are searching for your product.


However, choosing the right keyword is the important and difficult point to be considered in this process"

above words in form , and click submit button.
all the infomation got o databse
but when i try to retrive i get the information as
"
The secret of pay per click lies in choosing the right keywords for your potential customers to use when they are searching for your product. However, choosing the right keyword is the important and difficult point to be considered in this process"

i wont see the space . between product and however . it is mixed.what i have to do to get as it is i entered. i hope you understand my problem.i am using php for the site i am making

aarya
Junior Poster
139 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

A textarea should be multiline by default. Can you copy / paste the php code where you throw what's in the textarea into the database?

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

[html]article Body

Allowable Tags:
<b>, <strong>, <i>, <em>, <u>, <br>, <pre>, <blockquote>, <xmp>, <ol>, <ul>, <li>
<?echo $body?>[/html]
this is the html form


this is the php part where i through into the database[php]<?
$body=$_POST['body;];
$insert = "INSERT INTO tempsubart ( catageory,title,
summary,
body,
sig,
regdate,
keywords ,name ,email
)
VALUES ('$cat','$title','$summary','$body','$bio','$regdate','$key','$name','$email'
)";
$a=mysql_query($insert) ;?>[/php]

aarya
Junior Poster
139 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

Your problem *I THINK* appears to be with the wrap="physical" part of your HTML code. Have you tried ditching it and seeing what happens? Also, your textarea doesn't need a value="" attribute since the value is placed between the <textarea> </textarea> tags.

Also, I'm not sure if this was a mistake copying the code or if it's an actual bug, but you have $body=$_POST['body;]; where you have 'body; instead of 'body'

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

thanks i tried using striptags started working.thanks for ur help

aarya
Junior Poster
139 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

You mean http://us3.php.net/manual/en/function.strip-tags.php ??

I'm confused. Why was anyone typing html tags into the message to begin with? Unless I'm missing something ... Glad you got it working though!

cscgal
The Queen of DaniWeb
Administrator
19,437 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 231
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You