Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2221

Re: Form fields to database and back?

From bobm3@worthless.info
Newsgroups comp.lang.php
Subject Re: Form fields to database and back?
Date 2011-06-17 15:18 +0000
Organization A noiseless patient Spider
Message-ID <itfr83$env$1@dont-email.me> (permalink)
References <j48lv6prpshk57ora2dsp6b2lvp16vkvtu@4ax.com> <ite935$1b5$1@dont-email.me> <plelv6lp4m78uv2tg5mjtm9bd5f13douk5@4ax.com> <iteits$k2c$1@dont-email.me> <0fdmv6h8514nem46h0v92h0pbi018o5iun@4ax.com>

Show all headers | View raw


Well - another follow-up:

Using your advise this is what the results are:

Data as originally stored in varchar field:
prd ="^ptmdtr-slb.bna.com^";

Data as put back into the varchar field:
prd =&quot;^ptmdtr-slb.bna.com^&quot;;

I am using php.5.2.6 (older but I'm locked into it at this point) and 
mysql 5.0.25, apache 2.2.11

Upon retrieving the data I use $fld = htmlspecialchars($fld); to display,

and upon storing I use $fld = mysql_real_escape_string($fld); to update.

For what ever reason it appears that the fields are coming back from the 
browser (referenced as $fld = $_POST['field_name'];) actually still 
encoded.

So you see?  I'm at a loss with this (should be minor) issue.

Any more suggestions?

Thanks - Bob

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Form fields to database and back? bobmct <bobm3@worthless.info> - 2011-06-16 20:36 -0400
  Re: Form fields to database and back? The Natural Philosopher <tnp@invalid.invalid> - 2011-06-17 01:43 +0100
    Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-16 21:03 -0400
  Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-16 21:02 -0400
    Re: Form fields to database and back? bobmct <bobm3@worthless.info> - 2011-06-16 22:34 -0400
      Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-16 23:50 -0400
        Re: Form fields to database and back? bobmct <bobm3@worthless.info> - 2011-06-17 07:09 -0400
          Re: Form fields to database and back? bobm3@worthless.info - 2011-06-17 15:18 +0000
            Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-17 16:44 -0400
      Re: Form fields to database and back? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-06-17 13:28 +0200
      Re: Form fields to database and back? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-17 22:03 +0200
        Re: Form fields to database and back? bobmct <bobm3@worthless.info> - 2011-06-17 19:52 -0400
          Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-17 21:01 -0400
            Re: Form fields to database and back? Captain Paralytic <paul_lautman@yahoo.com> - 2011-06-22 09:05 -0700
              Re: Form fields to database and back? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-22 13:15 -0400
          Re: Form fields to database and back? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-06-18 08:35 +0200

csiph-web