Results 1 to 4 of 4

Thread: Displaying text from a submited variable
      
   

  1. #1
    teetwo is offline Special Status
    Join Date
    Feb 2008
    Posts
    14

    Default Displaying text from a submited variable

    I am trying to create a page that displays the text entered in a form textarea.

    I am using my own php Processor to acomplish a complex task prior to loading to database
    so far I have within the html on the page
    <?php echo "<pre>".$Item_Description."</pre>"; ?>

    My problem is that on the submission page text in the textarea box wraps but when the post statement transfers the text ie
    $Item_Description=$_POST['Item_Description'];

    The text is displayed in one line unless line feeds are placed at the end of each line within the textarea box.

    My question is. How do I format and display this text whithin a designated area with line wrapping etc.



    |................................|
    |................................|
    | Say in an area like this |
    |................................|
    |................................|

    Thanks in advance
    Terry

  2. #2
    teetwo is offline Special Status
    Join Date
    Feb 2008
    Posts
    14

    Default Re: Displaying text from a submited variable

    Well I found out how.
    My variable is $Item_Description

    <div id="bv_Text2" style="position:absolute;left:88px;top:149px;width :300px;height:100px;" align="Justify">
    PHP Code:
    Echo "<h4>"$Item_Description."</h4>"
    It works a treat and separation can be achieved by inserting a <br> in text input area. I shall note that on page for users.

    Ahh! This editor is better than I thought. My online garage sale site is all go that last display item held me up.

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Displaying text from a submited variable

    Hm... complicated way.....

    Ok, lets suppose that you have already set the variable $Item-Description

    Ad, in the page, a text object.

    Make the text:

    '.$Item_Description.'

    Right click it, select HTML, and add the following codes:

    In the BEFORE Tag :

    <?php echo '

    In the AFTER Tag:

    ';
    ?>

    You can format the text as you like. If you use the same font, font size, and you give the text object the same width as your text area, the text will be wrapped exactly as in the text area of the form. Changing the width of the text object you can set the real text to the dimensions (width) you like.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  4. #4
    teetwo is offline Special Status
    Join Date
    Feb 2008
    Posts
    14

    Default Re: Displaying text from a submited variable

    First off may I apologise for taking so long to respond. I have been working on my site. I appreciate your suggestion. It sure is neater.

    Combining php with html is new to me but like anything what was hard then you look back on and wonder why it gave you so much trouble.

    I have tried many editors and BV is by far the best. I have found now that I can create a beautiful page use the source as a php page and make the page dynamic.

    What with the self testing of submited elements I cannot fault it. A inbuilt help file would be nice but I just remembered this is the wrong forum.

    Thanks again Navel
    Last edited by teetwo; 09-02-2010 at 01:34 AM. Reason: spelling

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49