jbroder
03-10-2000, 06:31 PM
I'm having trouble with a php input to mysql. Somebody put their info in "quotes" and the input didn't make it to the database.
So, I want to check all fields for " and change it to "
I could do this
eregi_replace('"','"' $field1)
eregi_replace('"','"' $field2)
But that gets tiring. Is there php variable for allfields?
Something like:
do {
eregi_replace('"','"' $field)
}
while ($allfields);
On a similar note:
is there a php way to say
if ($var isInTheList(1,2,3,4))
instead of
if (($var == 1) || ($var == 2) || ($var == 3) || ($var == 4))
Any help would be great. I checked the online manual and couldn't find these kinds of functions.
Jon
So, I want to check all fields for " and change it to "
I could do this
eregi_replace('"','"' $field1)
eregi_replace('"','"' $field2)
But that gets tiring. Is there php variable for allfields?
Something like:
do {
eregi_replace('"','"' $field)
}
while ($allfields);
On a similar note:
is there a php way to say
if ($var isInTheList(1,2,3,4))
instead of
if (($var == 1) || ($var == 2) || ($var == 3) || ($var == 4))
Any help would be great. I checked the online manual and couldn't find these kinds of functions.
Jon