Gaia Posted August 13, 2006 Share Posted August 13, 2006 Hey.What i'm trying to do is create a post with variables and then with an external BB to use a query to create a new post/topic.I have that all down pat, i can get the topic/post made in the BB, but the spacing is all of. So i was just wondering, what code is equivilant to an HTML break, but maybe in ACSI like \p or \a or something?Thanks. Hopefully someone know's what i mean lol. Link to comment https://forums.phpfreaks.com/topic/17421-spacing/ Share on other sites More sharing options...
Orio Posted August 13, 2006 Share Posted August 13, 2006 \n :)Also look into [url=http://www.php.net/manual/en/function.nl2br.php]nl2br[/url] :) Link to comment https://forums.phpfreaks.com/topic/17421-spacing/#findComment-74154 Share on other sites More sharing options...
hitman6003 Posted August 13, 2006 Share Posted August 13, 2006 Here are some other ascii and hex characters that you may want.[quote]" " (ASCII 32 (0x20)), an ordinary space."\t" (ASCII 9 (0x09)), a tab."\n" (ASCII 10 (0x0A)), a new line (line feed)."\r" (ASCII 13 (0x0D)), a carriage return. [/quote]You can also wrap your text in <pre> tags to have the formatting remain the same. Link to comment https://forums.phpfreaks.com/topic/17421-spacing/#findComment-74158 Share on other sites More sharing options...
Gaia Posted August 14, 2006 Author Share Posted August 14, 2006 Thanks, question though, will mySQL recgonize those characters and make the spaces as needed or? Link to comment https://forums.phpfreaks.com/topic/17421-spacing/#findComment-74307 Share on other sites More sharing options...
448191 Posted August 14, 2006 Share Posted August 14, 2006 [quote author=Gaia link=topic=104096.msg415241#msg415241 date=1155524993]Thanks, question though, will mySQL recgonize those characters and make the spaces as needed or?[/quote]Your starting post suggests your formatting using html paragraph elements, so your probably better off storing chunks of html. A lot easier, no fuss no muss. Just be carefull what you insert, and always make sure what you display comes out of the db.If you haven't done so already, study [url=http://www.securiteam.com/securityreviews/5DP0N1P76E.html]SQL injection exploits[/url], otherwise storing html can be a security risk. SQL injection is always a risk anyways, so you need to have studied it. Link to comment https://forums.phpfreaks.com/topic/17421-spacing/#findComment-74361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.