Re: [PHP] Help with enter key in Forms
2006/6/2, George Babichev [EMAIL PROTECTED]: Awesome, thank you so much! It works! On 6/1/06, Chris [EMAIL PROTECTED] wrote: George Babichev wrote: Ok, I sent it to everyone and you. Now can you answer my question please? I type in 1 2 into my form in the program that i made, then when I view it, it shows 1 2 BUT if I check it in PHP My Admin it displays 1 2 The answer is to change this: ? echo .$row['post']. to this: ? echo .nl2br($row['post']). like I said before... -- Postgresql php tutorials http://www.designmagick.com/ Now that your problem is solved it would be a nice idea to study a little bit more about HTML and PHP so that you can find the explanation and solution for this and other problems on your own. Please read the manual, specially when someone is kind enough to point you the exact function to look for. PS: Have you understood what went wrong in your script? Have you understood what is the purpose of nl2br? If not, the kindness of those who answered you will have been in vain.
Re: [PHP] Help with enter key in Forms
George Babichev wrote: Hello everyone, I am programming a blog, and most of it is done, except I have one issue. When I am typing in the form (before I click submit) and I click the neter key to make a space, the MySQL database does not recognize that space. How do I make it recognize it? Unless you're stripping it out, it will recognise it. View HTML Source and you'll see the newline is actually in there. A \n is not a html newline so you need to convert it. What you want is http://php.net/nl2br -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with enter key in Forms
George Babichev wrote: Ok. well I looked more deeply into the issue, and I noticed that PHP My Admin does recognize that there are spaces. So if I click edit on PMA, it displays everything exactly liked I typed it. So why does my program not display it? This is the code I use Then you're not saving the spaces - so of course they can't be displayed. Always CC the list, you will get much better responses. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with enter key in Forms
Ok, I sent it to everyone and you. Now can you answer my question please? I type in 1 2 into my form in the program that i made, then when I view it, it shows 1 2 BUT if I check it in PHP My Admin it displays 1 2 So why is my program not showing those spaces? On 6/1/06, Chris [EMAIL PROTECTED] wrote: George Babichev wrote: I can't exactly reply all, because It is only sending it to you. Ok, so wait, the data with the spaces (enter keys), but why does my program not show it? Look. This is what I mean In your email program hit Reply ALL instead of Reply. Until you work out how to do that, I'm going to ignore your emails. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP] Help with enter key in Forms
George Babichev wrote: Ok, I sent it to everyone and you. Now can you answer my question please? I type in 1 2 into my form in the program that i made, then when I view it, it shows 1 2 BUT if I check it in PHP My Admin it displays 1 2 The answer is to change this: ? echo .$row['post']. to this: ? echo .nl2br($row['post']). like I said before... -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with enter key in Forms
Chris wrote: George Babichev wrote: Hello everyone, I am programming a blog, and most of it is done, except I have one issue. When I am typing in the form (before I click submit) and I click the neter key to make a space, the MySQL database does not recognize that space. How do I make it recognize it? Unless you're stripping it out, it will recognise it. View HTML Source and you'll see the newline is actually in there. A \n is not a html newline so you need to convert it. What you want is http://php.net/nl2br Uhhh did you try this -- nl2br? -- * Chuck Anderson • Boulder, CO http://www.CycleTourist.com * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with enter key in Forms
Awesome, thank you so much! It works! On 6/1/06, Chris [EMAIL PROTECTED] wrote: George Babichev wrote: Ok, I sent it to everyone and you. Now can you answer my question please? I type in 1 2 into my form in the program that i made, then when I view it, it shows 1 2 BUT if I check it in PHP My Admin it displays 1 2 The answer is to change this: ? echo .$row['post']. to this: ? echo .nl2br($row['post']). like I said before... -- Postgresql php tutorials http://www.designmagick.com/