Re: Newbie Question
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Newbie Question | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-14144@lists.php.net to get a copy of this message | ||
Yes there is:
Using a php function called: nl2br()
When the data is called from the db and printed to the page use $textdata = nl2br($textdata)
This will preserve the enter button being pressed.
Regards:
Russ
On Thu, 08 Nov 2001 09:54:16 -0600 Jay Fitzgerald <jayfitz@bayou.com> wrote:
> Ok, I am still fairly new at PHP and MySQL also, so please bear with me.
>
>
> TASK: I have a client that wants to have job openings listed on their site
> and they want to be able to add, edit and delete the postings themselves. I
> would do this in flat-file format but there is the risk of that file size
> getting too large and slowing down the server.
>
>
> SOLUTION: I have created a MySQL database that will hold all the postings
> in a table called 'jobs' and have created a PHP form that will post this
> jobs into the db.
>
> PROBLEM: When I go to the PHP form and enter all of the pertinent job
> information, there is one specific field that will have to have carriage
> returns/line breaks in it between paragraphs. Everything is working except
> for this. Is there a way whenever the user presses <ENTER>, that either
> PHP/MySQL will convert this into a <BR> tag only when being displayed in a
> browser and not in the db??
>
>
> Can anyone out there please help me with this? I am available off-list as
> well if it will be easier to pass code back and forth. Any assistance is
> greatly appreciated!
>
>
>
> Should you have any questions, comments or concerns, feel free to call me
> at 318-338-2034.
>
> Thank you for your time,
>
> Jay Fitzgerald, Design Director - CSBW-A, CPW-A, CWD-A, CEMS-A
> ==========================================================
> Bayou Internet..............(888)
> 30-BAYOU........................http://www.bayou.com
> Mississippi Internet.......(800)
> MISSISSIPPI...............http://www.mississippi.net
> Vicksburg Online..........(800)
> MISSISSIPPI................http://www.vicksburg.com
> ==========================================================
> Tel: (318) 338-2034 ICQ: 38823829 Fax:
> (318) 323-5053
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#