Jump to content


Photo

spacing


  • Please log in to reply
4 replies to this topic

#1 Gaia

Gaia
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts
  • LocationCanada

Posted 13 August 2006 - 06:31 PM

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.

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 13 August 2006 - 06:46 PM

\n :)
Also look into nl2br :)
Think you're smarty?

(Gone until 20 to November)

#3 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 13 August 2006 - 06:48 PM

Here are some other ascii and hex characters that you may want.

" " (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.


You can also wrap your text in <pre> tags to have the formatting remain the same.

#4 Gaia

Gaia
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts
  • LocationCanada

Posted 14 August 2006 - 03:09 AM

Thanks, question though, will mySQL recgonize those characters and make the spaces as needed or?

#5 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 14 August 2006 - 06:53 AM

Thanks, question though, will mySQL recgonize those characters and make the spaces as needed or?


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 SQL injection exploits, otherwise storing html can be a security risk. SQL injection is always a risk anyways, so you need to have studied it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users