List:General Discussion« Previous MessageNext Message »
From:clint lenard Date:September 12 2005 6:36am
Subject:Re: HTML in MySQL?
View as plain text  
Wow, thanks for all of the Information guys! I've learned alot and now I've 
actually been doing more brain storming... I've been reading all of these 
emails over and over - and they're helping me understand more!

What I'm trying to do is save "User Sites" in MySQL and use PHP to pull them 
out through the Database using a Virtual Directory (if that's what it could 
be called?) like: http://mysite,com/bob-in-germany or just 
http://mysite,com/bobingermany/

There may be a ton of these sites as time moves on and I'm just trying to 
make sure I learn as much as I can before I get a major problem on my 
hands... I know it may be resource intensive - but it just seems to be 
easier to delete unused sites through a DB rather than a File System I may 
not have full control over?

Anyways, Thanks again guys! This is helping alot! anymore feedback would be 
great!

- Clint

P.S. - Sorry Jasper for sending it to you and not the list... I'm new to 
GMail :(

On 9/11/05, Jasper Bryant-Greene <jasper@stripped> wrote:
> 
> Jasper Bryant-Greene wrote:
> > John Trammell wrote:
> >
> >> $input = "This is <br> the \n input"; # value from user
> >> $saved = "This is <br> the <br> input"; # value in database
> >> $recovered = "This is \n the \n input"; # retrieved from db, != $input
> >
> >
> > Please don't top-post. That is the perfect argument for not applying
> > nl2br() before saving the information in the database. It should be done
> > *when outputting* instead.
> >
> > <?php
> > $in = mysql_real_escape_string("This is <br> the \n input");
> > mysql_query("INSERT INTO my_table (my_field) VALUES ('$in')");
> >
> > $array =mysql_fetch_assoc(mysql_query("SELECT my_field FROM my_table"));
> > print(nl2br($array['my_field']));
> > ?>
> >
> > works exactly as intended.
> >
> 
> Oh, and I should mention you probably want to htmlspecialchars() that
> data too, if you actually want to see the <br> and if you want to
> protect from XSS attacks etc.
> 
> --
> Jasper Bryant-Greene
> Freelance web developer
> http://jasper.bryant-greene.name/
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
> 
>

Thread
HTML in MySQL?clint lenard9 Sep
  • Re: HTML in MySQL?Jasper Bryant-Greene9 Sep
    • Re: HTML in MySQL?clint lenard9 Sep
      • Re: HTML in MySQL?Jasper Bryant-Greene9 Sep
        • Re: HTML in MySQL?clint lenard9 Sep
  • Re: HTML in MySQL?douglass_davis12 Sep
    • Re: HTML in MySQL?clint lenard12 Sep
      • Re: HTML in MySQL?clint lenard12 Sep
        • Re: HTML in MySQL?clint lenard12 Sep
          • Re: HTML in MySQL?Hassan Schroeder12 Sep
RE: HTML in MySQL?SST - Adelaide)9 Sep
Re: HTML in MySQL?Unknown Sender9 Sep
Re: HTML in MySQL?Unknown Sender9 Sep
RE: HTML in MySQL?Alan Williamson9 Sep
  • Re: HTML in MySQL?Unknown Sender9 Sep
    • Re: HTML in MySQL?gerald_clark9 Sep
    • Re: HTML in MySQL?Filipe Tomita9 Sep
  • Re: HTML in MySQL?Unknown Sender9 Sep
RE: HTML in MySQL?John Trammell9 Sep
Re: HTML in MySQL?Unknown Sender11 Sep
  • Re: HTML in MySQL?Roger Baklund11 Sep
Re: HTML in MySQL?Unknown Sender11 Sep
RE: HTML in MySQL?John Trammell11 Sep
  • Re: HTML in MySQL?Jasper Bryant-Greene12 Sep
    • Re: HTML in MySQL?Jasper Bryant-Greene12 Sep
      • Re: HTML in MySQL?clint lenard12 Sep