Display of the paragraphs of the text from MySQL database

Hi all

I have a small database used to store news articles and post them on a website.  However what is happening, is that the press articles are not displayed with the information in the paragraph which came it.


When the page is displayed it just displays the text in a block even if I see the carriage returns if I discover the database in phpMyAdmin.

Can someone help please?

You have two options:

  • Save your items with embedded HTML (use something like FCKEditor or TinyMCE to add HTML features to your text box on the entry form)
  • Place two new lines between each paragraph in the text entry and use the PHP function nl2br() displaying the output

Dreamweaver CS4 (and CS3) go insert nl2br() around dynamic text if you double-click the dynamic text object in the server behaviors panel and select Convert - new lines to BRS licences in the menu format. This encapsulates the object dynamic text as follows:


nl2br() converts line-break characters in
.

Tags: Dreamweaver

Similar Questions

  • Populating a drop-down menu form with the values from MySQL database

    I'm creating a simple CMS that will allow staff to add new items on their site (sale of furniture).

    I want them to be able to choose from the list of values for some fields to ensure that the items are displayed on the website correctly (IE to avoid typos etc.).

    I have spent a lot of time to trawl forums and have so far obtained the code below.  When it was working I could only get the dropdown menu options of data contained in the database, as opposed to the list of DEFINED values that initially, I would put in my database.

    For example under the field named 'Type', I assigned these values: all ('table', 'chair', 'buffet', 'convenient', 'bottles', 'library', 'mirror', 'drawers','s chest', 'display', 'tvunit', "bedside", reads, "wardrobe", 'dressingtab', 'blanketbox', 'Office', 'filing cab', "workstation")

    Here's what I want to display in the drop-down, not only the five values of elements already in it.

    However, my CMS page is nothing display now not in the drop down and I can't understand why not!

    So my question is, first of all any ideas what's wrong with my code?  And second, how to fill the bottom of the fall with SET values?

    Thank you very much in advance for your help!

    I didn't want to bore you, then the code below is just the bit that is relevant to my question, rather than any connection $POST and info php etc.

    It is in my code php at the top of my page

     $sql = mysql_query("SELECT DISTINCT id, supplier, room, type, material, finish, bespoke, image FROM furniture ORDER BY ASC");
    
                        while($row = mysql_fetch_assoc($sql))
                        {
                    $supp .= "<option value=\"{$row['supplier']}\">{$row ['supplier']}</option>";
                    $room .= "<option value=\"{$row['room']}\">{$row['room']}</option>";
                    $type .= "<option value=\"{$row['type']}\">{$row['type']}</option>";
                    $material .= "<option value=\"{$row['material']}\">{$row['material']}</option>";
                    $finish .= "<option value=\"{$row['finish']}\">{$row['finish']}</option>";
                    $bespoke .= "<option value=\"{$row['bespoke']}\">{$row['bespoke']}</option>";
                        } 
    

    It's in my html code

    <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1"  id="form1">
    
                    <label for="supplier">Manufacturer</label>
                    <select name="supplier" id="supplier" title="<?php echo $row_add['supplier']; ?>" >
                      <? echo $supp; ?>
                     </select>
           
    
                     <label for="room">Room</label>
                    <select name="room" id="room" title="<?php echo $row_add['room']; ?>" >
                      <? echo $room; ?>
                     </select>
    
                           <label for="type">Type</label>
                          <select name="type" id="type" title="<?php echo $row_add['type']; ?>">
                           <? echo $type; ?>
                          </select>
       
    
                          <label for="material">Material</label>
                          <select name="material" id="material" title="<?php echo $row_add['material']; ?>">
                          <? echo $material; ?>
                              </select>
           
                              <label for="finish">Finish</label>
                          <select name="finish" id="finish" title="<?php echo $row_add['finish']; ?>">
                            <? echo $finish; ?>
                              </select>
       
                           <label for="bespoke">Can be made-to-measure?</label>
                           <select name="bespoke" id="bespoke" title="<?php echo $row_add['bespoke']; ?>">
                          <? echo $bespoke; ?>
                          </select>
    
                                  <input type="Submit" name="Add" id="add" value="Add" />
                          <input name="date" type="hidden" id="hiddenField" value="<?php echo $todayis['date']; ?>">
                          <input type="hidden" name="MM_insert" value="form1" />
                          </form>
    

    > So, don't you think not with my different approach?

    Yep, that's how it should be done.

    Note the OP also mentioned that they are filled with 6 drop-down lists:

    > 6 fields I want to post, drop downs in my a form are: provider, room, type of material, finish and custom.

    So you can create a table for each separate... but what I would probably do is store everything in a single table (depends of if you need to store additional information or if it's just a list of choice):

    optionsTbl

    Category ID value

    ------------------------------

    1 provider abc

    2 vendor xyz

    3 living room

    4 dining

    Enter values using a set of multiple records in the query: Select value of optionsTbl category WHERE = 'suppplier. " Select the value optionsTbl category = "room"; etc.

    Then fill the drop-down lists by looping through each query in the recordset and use next_result() to perform a loop on the next game.

  • I have reset default firefox but the BBC website opens OK but will return to the display of the text when I click on a link.

    (Newish laptop so I'm not really familiar with operating systems (Win 8.1 I think) and more) Initially, my BBC homepage opened OK in Firefox, but after a period, he began to view a text version. This can be temporarily cured by restoring the default Firefox (Firefox / help / troubleshooting information / restore Firefox) but as soon as I click a link on the page of the BBC, it is up to the display of the text. Is there a way I can solve this problem. Other sites seem to be working properly.

    It's a problem of missing style sheet. If you have modules like Adblock Plus installed, first of all, try to start Firefox with the disabled modules and check if the problem persists.

    Otherwise,.

    1. Hold down the ALT key and press V to open the view menu. Open the submenu Style Page and make sure that "Basic Page Style" is selected.
    2. Clear the cache.
    3. Remove the cookies from the site in question.
    4. If the problem persists, see
  • Conditional display in the text box based on the calculated value

    Hello

    I have radio buttons that each have a numerical value. For example = 1 A = 2 C = 0. In the example below, the total is equal to 5.
    examplescreen01.gif

    The sum is displayed at the bottom of the document and is passed to another text box:

    examplescreen02.gif

    Instead of '5' displayed in the text box on the right, it should display a "Control" Word like this:
    examplescreen03.gif

    The displayed word is based on the totals through this range:

    1-2 = 'absorbing '.

    3-4 = 'practitioner '.

    5 to 6 = "control".

    The script I used to pass the value from the left to the right text box in the chart above is:

    name of the field to text box;

    var cTextBox = 'Cabinet Talent strategy knowledge - total';

    get the value of the field with the name in cTextBox;

    var sTextBox = this.getField ("cTextBox") .value;

    Set the value of this field;

    Event.Value = sTextBox;

    That I need to add to this script to show one of the words, such as "control" above?

    I am a complete novice to scripting. I found the above script online and somehow got it to work.

    I thank very much for any help or pointers, you can provide.

    Best regards

    Chris

    Sorry, there were some errors in the code that I provided above. Try this:

    If (sTextBox > = 1 & sTextBox)<= 2)="">

    Event.Value = "absorbing";

    } ElseIf (sTextBox > = 3 & sTextBox)<= 4)="">

    Event.Value = "practitioner";

    } ElseIf (sTextBox > = 5 & sTextBox)<= 6)="">

    Event.Value = "master";

    } else {}

    Event.Value = "";

    }

    If it still does not respond, you can send me the file at [email protected] and I'll check...

  • Is there a way to extract all the text from the captivate course?

    Hi all, someone can tell me if there is a way to extract all the text from a captivate file? We need to convert all the texts on the audio screen and insert audio into each slide... Thank you for all the input.

    Hello

    Try clicking on file > export > project captions and subtitles. Who should produce a Microsoft Word document.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • I would like to bring to the text from Word (and the web) which is already a hypertext link in InDesign. How can I do it while keeping the links active?

    I would like to bring to the text from Word (and the web) which is already a hypertext link in InDesign. How can I do it while keeping the links active?

    Whenever I have to copy and paste from the web or Word it removes hyperlinks.  And when I try to do in 'Place' ing a Word document in my InDesign project that it retains formatting with it, the rectangles around the text.

    I have the latest version of InDesign.

    Any help is appreciated.

    Copy-paste might not include the shaped. A regular import using square is the best way.

    The rectangles around the hyperlinks are just to indicate that they are links - they do not print, but they appear in your PDF.

    You can delete them by double clicking on the hyperlink in the hyperlinks Panel and select "Rectangle Invisible" as the type.

    In general, Word formatting of hyperlinks - blue text, underline - with a character Style. If you want to remove or change the formatting, all you have to do is to change the character style. My experience, however, is that you need to check all the hyperlinks because no reason apparent, sometimes they appear in the document without the character style.

  • Reoading updated the text (from web) file

    I have a project that captures the text from a text file I have on my server. The code I use is at the bottom of this post...

    I have an empty cast member called "ClientListImport" and the script works great! - but the problem I have is when I update the text on the server (via a PHP script), the project manager does not update unless I left the projector and the re-launch. I tried to re - run the importFileInto script in the projector, but it won't pull in the new values.

    It's almost as if the text file is cached, or re - run the command is simply ignored for some reason any. How can I get Director to import the text updated on my server? I have to purge the first original text file? The code can be run one time?

    Any help would be appreciated.
    Thank you!
    ------

    Here is the code I use to insert the text file in my "ClientListImport": cast member

    > tempURL = getNetText (" http://www.MYWEBSITE.com/ClientListImport.txt")

    New: you need to add a fake query string so that the Director does not use
    a version cached

    netID = getNetText (" http://www.MYWEBSITE.com/ClientListImport.txt?id=" &)
    the milliseconds)

    > If netDone (netID) then
    > member("ClientListImport").text = netTextResult (netID)
    > end if

    Be aware that you must run a loop on a frame netDone expects to return
    Property to TRUE before accessing the netTextResult(). It is possible it is a 'failure '.
    for you because you jump right in front of the netDone because netTextResult is
    SET TO FALSE.

    -script #movie:
    global gNetID

    on prepareMovie
    tURL = "" http://www.MYWEBSITE.com/ClientListImport.txt?id= " "
    tURL = tURL & string (milliseconds)
    gNetID = getNetText (tURL)
    end

    on enterFrame
    If netDone (gNetID) then
    If netError (gNetID) = 'OK' then
    Member ("ClientListImport"). Text = netTextResult (gNetID)
    -spread regardless of other changes are necessary
    on the other
    alert ' text file read error: "& netError (gNetID)
    end if
    end if
    end

  • Year (only) extracted from field Date and display in the text field

    I need extract the year from a field of date entered by the user and display the year in a text field. Can someone help me with the correct script to do this?

    Hello

    It is quite easy to achieve with FormCalc.

    In you the output of the date fields event add the following code:

    textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
    

    Note: This example assumes that your date field formats the date with "MM/DD/YYYY". You may need to change the schema to make it work for your purpose.

  • How to read the text from a DOS window in real time?

    I call an executable file that downloads a file to flash memory.  This program displays status information in real time as the percentage of completion in one window BACK.   It also makes account of the CRC of the file as it downloads.  I am currently redirect the output of the DOS window in a text log file.  This works fine for obtaining of the CRC when the file is actually downloading but the operator loses the visibility of the State in the percentage of download.  Is there a way to read text information in a DOS window with my request of LabWindows/CVI real-time?

    Hi Brent,

    If redirect you the output from the first application in a log file, you would be able to read the contents of the file streaming to your second request, and whenever the content changes (such as the download value percentage), couldn't display you this information immediately with the second request in one window DOS or some other GUI?

    Luis

  • Get the text from other text fields

    Hello

    on the title page of may document I put the date and the version number of my document. I want those to appear again on every page of my document, but not in the same place as and smaller than on the title page. So, I could simply create new areas of text on the masters and put the date and revision number in these boxes. But this means that every time that I update on the title page, I have to update on the master as well.

    I want to set the date manually, so I think that I can't use text variables. I tried the cross-references, but this turns the text on the master pages into links on my title page which I don't want.

    Is there a way to automatically fill the text boxes on the mask with the version number and date of the title page?

    Content with Styles of card collector

    Step 1: Open the content Collector > click on the button of the collector (Pick-up) > Click image

    Step 2: Click on the place (bashing) button > to create a link > activate card Styles > choose from the 3 buttons if you want to place once or several times, etc.. I've said it once, and then unload.

    Step 3: Click on the pencil: change the Style mapping

    Hidden step: start by creating your styles. You said you want different sizes; The Style mapping is required.

    My kind of style is a paragraph, which should work for you.

    Choose new style mapping and map style to another.

    Step 4: Your cursor is responsible. You are on the Place (bashing) tool. Click to position it. In this example, the upper date is greater, pasted date is to the smaller format, with a different style.

    Step 5: With the text tool, changing the date. Update the link.

    https://helpx.Adobe.com/InDesign/ATV/CS6-tutorial/using-the-content-collector-and-content-or-tools.html

  • AppleScript to save the text from the view of results

    Hello, I am working with applescript that takes the results in the window at the bottom of the editor, like this

    Now I try to write it in the text editor as a text but Applescript say that he can not with "can't turn"class IFAP in the text.

    and if I try to save the results as a list, applescript supports error 10000 (textEdit has encountered an error: failure AppleEvent written in popup)

    It's that everybody knew how can I solve this problem?

    Here is the text of the script, but it won't work on your mac because it uses application to imagine Photo.

    thisFile to Choose file with guest "choose an image file:

    say application "Imagine the Photo.

    the value thisImporter for import graphics thisFile

    if the component error of thisImporter is not equal to 0 then

    thisImporter close

    display the dialog box "Not an image file that quicktime recognizes."

    return

    end if

    the value {x, y, xDim, yDim} to the limits natural of thisImporter

    define thisDocument to make new document window properties {size: {xDim, yDim}}

    the value the destination of thisImporter to thisDocument drawing

    thisImporter trace

    thisImporter close

    -The section which follows should be replaced according to the pixel value class

    the value pixelValueRect to {x, y, xDim, yDim}

    the value pixelValues1 to get the pixel values of thisDocument with properties {class of pixel values:pixel in the rectangle, rectangle boundaries: pixelValueRect}

    thisDocument close

    -class (pixel points) as a list

    -' class pCol' as a list - цвета координаты разнесены по классам с именами, приводим к списку и

    end say

    say application "TextEdit".

    activate

    make a new document

    the value text of document 1 to pixelValues1 as list

    -the text of the document 1 pixelValues1 as a value list

    -Save the document 1 in ' / Users/IMac/Desktop/LastUpdate.txt '.

    end say

    pixelValues1

  • Thunderbird displays only the text in the messages received or sent, even if the options are set for the HTML pages.

    Using Thunderbird 25.6.0, running on W7 - 64-bit.
    Have used the T-bird constantly since it was morph'ed from Netscape Communicator, so feel I understand basis, including the specification HTML or text/HTML options.

    A user Windows, Thunderbird account works perfectly, for the second user of Windows, all Thunderbird email accounts (4-a profile of T-bird) suddenly transformed to send and receive all messages in text only.

    I regularly compose messages in HTML format, using the wide range of fonts, colors, embedded graphics. The compositions remain intact (HTML) until the moment where I send them. The copy in my "sent" folder is in the text; one of the graphics incorporated in my original will be attached, and all the others will be gone. If my recipient respond or forward the message to me, all of my original material is text, as well as all my recipient adds to his response.

    In addition, all original incoming messages of my correspondents are in simple text. Not a sign of HTML anywhere unless I have to compose a message, or a message saved in my drafts folder.

    What is the problem and how can I solve this problem?

    Dean Jones

    NO, I ask a question. I was NOT choosing my question as a solution to my question.

    Usually, when I start new topics, I am taken in part because it's something twice 6 months ago.

    I have no solution. I have a problem. I'll start a new topic

  • How to extract the text from corrupted pages file

    Really appreciate if someone of you knows a way to extract text from a page files of 9 MB that contains text and images and which does not:

    Error message: file format not valid.

    Change the type of file and opening in various programs (Word, Acrobat, Google doc converter) but nothing I've tried will open it.

    I have a backup at home, but am away for several weeks and done a lot of work on this file since the last backup.

    I hope there is a solution! Thank you

    JR

    If it is in fact a v5 Pages document, and it will not open in preview, or open in v5 Pages while holding the SHIFT key, then you're done. The inner content in Pages v5 is in a format that is illegible, indecipherable, scrambled anything able to read except Pages v5.

    If it's a v5.5.2 Pages or a later version of the document, then it is by default in a single file format (file zip compressed/renamed), and no version of Pages thru v5.2.2 on Mavericks v5 was designed to play a single file format documents that are not original Pages ' 09. If it is a document Pages from Yosemite or El Capitan, you will need the v5.5.3 Pages or later to change the type of file to the package format - which can be read by v5 + Pages on the Mavericks.

    If it is a Pages ' 09 document, there is a good possibility that your attempt to open/edit/etc this document with all of the people mentioned applications has damaged the document permanently. Try the preview or the free LibreOffice (v5 or later) which can open documents file format only (not the package files) of Pages ' 09 very simple, sometimes with pictures. No warranty if.

  • Cut the text from the image using the Pathfinder tool

    Hi all

    I'm cutting text from an image in Illustrator. I use the version on a Dell XPS 12 CS6.

    I have scoured the internet for instructions and have tried everything, but when I followed the same steps in Illustrator I don't get my desired result. I created the contours for the text, so that the image and text are on the same layer, grouped (and dissociated) and then I tried all the options in the pathfinder, nothing helps. I've done it before with an image, but for some reason can not get it to work this time.

    I even tried to make the image in a clipping mask, so it would be a 'form' instead of 'image', but that didn't do anything either.

    If anyone has any advice, I would greatly appreciate it that I spent hours trying to figure this out!

    Thank you!

    Erin

    Pathfinder will not work with a path and a picture.

    Instead, put your text above the image (it can be the living text), select both.

    You can then use the button do mask in the transparency to cut your text on the image palette.

  • Problem with the display in the text field font

    When I create the static text field, choose the font: Arial, Tahoma or Verdana or trebuchet

    Anti-aliasing on the police of device use and put the text in regular style and "BOLD"

    then, the text that is displayed in the style "BOLD" looks the same for all fonts

    03.png

    The device font is roughly what its name suggests.  It uses a police she chooses what the machine is available - with some to find the one that corresponds to the planned police (I don't know how intelligent the font engine is that it can determine what a font looks like, especially one who does not - I suspect human intervention in the process).

Maybe you are looking for