1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

php text box

Discussion in 'Web Design & Development' started by Grob needs help, Apr 11, 2010.

Thread Status:
Not open for further replies.
  1. Grob needs help

    Grob needs help Thread Starter

    Joined:
    Mar 3, 2009
    Messages:
    327
    ok i am trying to make a form that will be used to put text on the main page, this is done but entering it into a form and storing it in a mysql table, the problem i am having is that when i have things like 's and "" the script thinks the text has ended and so shows up an error message. is there a way around this, also is the a way to put in new lines without using <br /> tags?

    thanks
     
  2. anawnemoose

    anawnemoose

    Joined:
    Apr 11, 2010
    Messages:
    5
    Use the mysql_escape_string() function (or else you're vulnerable to SQL injection) and you can't make a new line in HTML without <br />.
     
  3. Grob needs help

    Grob needs help Thread Starter

    Joined:
    Mar 3, 2009
    Messages:
    327
    well that would work, but i would point out as of php4.3 mysql_real_escape_string() is the string to use as mysql_escape_string() is less reliable and is continued as of php5.0

    but as for the <br /> i was meaning something like is done for making the reply box like on this forum how is that done?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - text
  1. charlzguitarz
    Replies:
    4
    Views:
    613
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/916219

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice