[PHP-DB] html input element rendering html entities

2009-07-16 Thread Troy Oltmanns
Hey guys and gals,

I have a little tricky situation so I will explain as best as I can.

I've got a form that loads and saves product data to mysql. In some fields
like the heading and subhead we use special characters like Omega,
Registered Trademark, and Ampersand. When putting the data in I will encode
them as Omega;, etc. Once saved, all is good, everything goes ok and will
display correctly in  the user interface. However, if I go back to edit that
product, in the html input element, it will actually display the character
rather than the entity code (although when checking the source, the html
entity is coded correctly). Then when it is saved, it saves as the illegal
character and will serve up a few funky characters in the user interface and
in the database.

I have the code stripping out tags and I tried to use the
mysql_real_escape_string to no avail.

Anyone have experience with this kind of thing?
PHP Version 5.1.6*MySQL 5.0.19*


Re: [PHP-DB] html input element rendering html entities

2009-07-16 Thread Troy Oltmanns
That's the thing, it is being saved the same way, it's that when the page
loads the data the input element automatically changes the display to the
special character, and when it saves, it saves as that character.

On Thu, Jul 16, 2009 at 2:37 PM, Govinda govinda.webdnat...@gmail.comwrote:

 I've got a form that loads and saves product data to mysql. In some fields
 like the heading and subhead we use special characters like Omega,
 Registered Trademark, and Ampersand. When putting the data in I will
 encode
 them as Omega;, etc. Once saved, all is good, everything goes ok and will
 display correctly in  the user interface. However, if I go back to edit
 that
 product, in the html input element, it will actually display the character
 rather than the entity code (although when checking the source, the html
 entity is coded correctly). Then when it is saved, it saves as the illegal
 character


 I am newbie here, but isn't it that you just need to save at this ^^ point
 the same way that you saved the data in the first place?
 If it worked the first time, why not now?

  and will serve up a few funky characters in the user interface and
 in the database.

 I have the code stripping out tags and I tried to use the
 mysql_real_escape_string to no avail.

 Anyone have experience with this kind of thing?
 PHP Version 5.1.6*MySQL 5.0.19*


 
 Govinda
 govinda.webdnat...@gmail.com


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MSsql madness

2011-06-24 Thread Troy Oltmanns
Hey php-dbers,

I have a helper script that connects to an MSsql database to select retailer
location information, which is then processed into mysql statements to be
inserted into another remote database (this one MYsql).

Currently it is ran manually from a windows system that was preconfigured
(prior to my arrival). It's my task to get it integrated into a linux
installation so that it can be set up under crontab to execute daily.

My issue is that in testing (I am running MAMP on mac 10.6.7) the mssql
functions are not available out of the box. Since I am not a formal
programmer, this is compounded by the fact that the process to configure
build and install is completely foreign to me. I followed some instruction (
http://www.tumblr.com/tagged/mssql+mamp+php+mac+osx) to download freetds and
I tried to run the first command (./configure
--prefix=/Applications/MAMP/Library --with-tdsver=8.0
--sysconfdir=/Applications/MAMP/conf/freetds) with my appropriate
information, and I am given this error: configure: error: no acceptable C
compiler found in $PATH See `config.log' for more details.

In doing more research, many say that gcc should be already installed on my
mac, but it's not. Other posts say you can get it in xcode, but Apple now
forces you to pay $100 to get apple dev tools... yeah right! I found GCC at
*gcc*.gnu.org, but when trying to run (../gcc-4.6.0/configure) it runs into
another issue checking for cl.exe... no
configure: error: in `/Users/toltmanns/Downloads/gcc':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.


Tell me, how in the world are you suppose to compile a c compiler when you
dont have one yet?

Any direction would be helpful.

Are there alternative ways to interact with MSsql?

Thanks,
Troy Oltmanns