Jump to content

[SOLVED] how to replace new line posted html form by <br>


jaas

Recommended Posts

hi,

 

 

My code goes like this :

 

<HTML FORM action="text.php" method="post">

 

here I am submitting

textarea = "I

                  am

                  jaas"

</HTML FORM>

 

when it goes to browser it goes like

some path?textarea=I00A00am00A00jaas

 

actually there are some different characters.to give example I am using '00A00' instead of that.

 

After that I am fetching this in a php code "text.php" as follows :

 

<?php

$tmp_text = $_GET["textarea"];

 

echo $tmp_text;

?>

 

 

Result is "I am jaas" and not the expected.

 

Please tell me the way out.

 

Regards.

 

Link to comment
Share on other sites

MySQL? Huh? And the question... What? Please rephrase it. Your HTML is incorrect. Forms look like this:

 

<form action="nextpage.php" method="post">
<textarea name="comment"></textarea>
</form>

 

And how is the value of the textarea ending up in your URL if you are using 'post' as your method. Doesn't make sense.

Link to comment
Share on other sites

Hi guys, I have a similar issue.

I have a website where I post reviews for plays, musicals, etc.

On the Review page, I have something like this, to output Title, Image, and the Review Text

 

<h1><?php echo $row_rs_review['reviewTitle']; ?></h1><br />

<p><img src="_revIMG/<?php echo $row_rs_review['reviewIMG']; ?>"/> </p>

<p><?php echo $row_rs_review['reviewDesc']; ?><br />

 

The problem is that all of my reviews are long and often separated by paragraphs. How can I display the text properly without being shown continuously?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.