cafrow
01-24-2006, 02:17 PM
I my years of programming php I cannot belive I have not run into this problem before. My problem is I am taking input from an html input box and storing it in mysql, no problem yet, then I recall the from the mysql and display it in an HTML input box, this is where the problem is.
The string example I am trying to store is:
-1" vertically shorter
When I grab this string from mysql and out put in into html it screws up the html and only -1 shows in the input box. Here is the html source code after the input
<input name="stock_vertical" type="text" value="-1" vertically shorter" size="12" />
And here is the PHP code
<input name="stock_vertical" type="text" value="<?=$size_row['stock_vertical']?>" size="12" />
I know there has to be something I can do, I tried some stuff with Addslashes() but that did not help me, also tried to double "" each quote and that did not work. Any help would be awesome.
Thank you.
The string example I am trying to store is:
-1" vertically shorter
When I grab this string from mysql and out put in into html it screws up the html and only -1 shows in the input box. Here is the html source code after the input
<input name="stock_vertical" type="text" value="-1" vertically shorter" size="12" />
And here is the PHP code
<input name="stock_vertical" type="text" value="<?=$size_row['stock_vertical']?>" size="12" />
I know there has to be something I can do, I tried some stuff with Addslashes() but that did not help me, also tried to double "" each quote and that did not work. Any help would be awesome.
Thank you.