Forum Moderators: coopster

Message Too Old, No Replies

Quotes in tables

         

Twisted Mind

1:33 pm on Jan 23, 2006 (gmt 0)

10+ Year Member



When i put quotes in my tables (in a form through php) i cant return it in to a checkbox the checkbox will go away this way how can i fix this?

ergophobe

5:17 pm on Jan 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Depending on what's happening, you might have to process the string with

- htmlentities() to turn the quote marks into entities (probably this if it's just a text string)

- addslashes() to escape them (if it's in, say, a javascript alert box)

- string_replace() to get rid fo them if it's just ending up doubling the attribute quote marks.

Can you give a little more detail on where the quotes are going and what you're doing? In other words, using view source to look at the generated HTML, can you show us what one fo the offending checkboxes looks like?

Twisted Mind

9:10 am on Jan 24, 2006 (gmt 0)

10+ Year Member



sry it was just a result from a table the name of something so when i opened a page where the name had quotes i dind get the input box.

I think it its ur above answer :D.

Twisted Mind

9:17 am on Jan 24, 2006 (gmt 0)

10+ Year Member



now i know what the problem is...

My forms use the GET tag and to get to this fom i follow a link wich displays it with for example name="prod" so that does not work while making a link.

a href="index2.php?option=blablapage&type=edit&name="prod"" so that does not work :D (i cant do this with id i guess)

ergophobe

11:30 pm on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ahh, you probably want to just do a str_replace then like

str_replace('"', '', $product);

something like that