direktors Posted July 16, 2006 Report Share Posted July 16, 2006 ir man forma ar teksta laukumu tālākai ievietošanai datubāzē <textarea name="... problēma - ja tekstalaukā ir lietots enter(jaunas rindas..) pēctam šo tekstu iemet iekš db, tad velkot kaukur webā ārā jaunās rindas nav vairs, viss vienā rindā, gabalā. datubāzē cik sapratu jaunās rindas ir. kas pa vainu? Link to comment Share on other sites More sharing options...
destroy_all Posted July 16, 2006 Report Share Posted July 16, 2006 nl2br(); Link to comment Share on other sites More sharing options...
direktors Posted July 17, 2006 Author Report Share Posted July 17, 2006 labi. un ar ko man aizstāt <br /> kad es to tekstu izvelku lai labotu atpakaļ tekstalaukā no datubāzes. Link to comment Share on other sites More sharing options...
Kristabs Posted July 17, 2006 Report Share Posted July 17, 2006 (edited) strip_tags(); or $prieksh_textarea = str_replace("<br>", " ", "$txt_no_db"); Edited July 17, 2006 by Kristabs Link to comment Share on other sites More sharing options...
direktors Posted July 17, 2006 Author Report Share Posted July 17, 2006 (edited) ja datubāzē ierakstu piem, <? echo 'haaahaa'; ?> tad ka man izvadit sho tekstu kā tekstu, nevis kodu, kas izpildas? arī šai gadijumā lietot strip_tags()?? Edited July 17, 2006 by direktors Link to comment Share on other sites More sharing options...
v3rb0 Posted July 17, 2006 Report Share Posted July 17, 2006 http://php.net/highlight-string un būs pat krāsains. Link to comment Share on other sites More sharing options...
direktors Posted July 17, 2006 Author Report Share Posted July 17, 2006 tas ka krāsains šoreiz man nav būtiski. es pašķirstiju php.net un izvelejos pie pievienošanas izmantot $var = htmlentities($var); un tādu lieku tabulā iekšā. Link to comment Share on other sites More sharing options...
Recommended Posts