PHP Adding/Editing DB via FORMS

Discussion in 'Coding Help' started by ziycon, Mar 20, 2008.

  1. ziycon

    ziycon New Member

    Nope, had no effect at all on the string!?
     
  2. louie

    louie New Member

    How is the string stored in the DB? can you copy & paste here?
     
  3. ziycon

    ziycon New Member

    Its stored in a field of type text in the DB. Just like below:

     
  4. louie

    louie New Member

    If you look at the page source can you see the <br> tag?
     
  5. ziycon

    ziycon New Member

    Shows up as &lt;br&gt;.
     
  6. louie

    louie New Member

    that's your problem.
    run a replace function
    PHP:
     
    str_replace
    (array("&lt;br&gt;","&lt;br &gt;","&lt;br /&gt;"),"<br />",$string);
    and that should sort out your problem
     
  7. ziycon

    ziycon New Member

    You are a genius louie, fair play to you, its working perfect now after so long of messing around, really appreciate the help, i owe you one man!
     
  8. louie

    louie New Member

    no problem. you owe me more than one :) lol
     

Share This Page