Hi Edward, [I've put this back on the list - others will be able to share their wisdom/you might not have to wait so long for me to get around to a reply!]
My first thought is that you have a neat system of encoding the link data being stored in MySQL. I assume this is preceded by some sort of 'extract' function which takes the link out of some HTML page? That being the case, and particularly if you are using a PREGI to accomplish the 'extraction', why don't you store the two components of the HTML link in two separate columns? So "<a href="http://www.test.com"> test </a>" could become "www.test.com" and "test". The disassembly step being part of the (presumed) existing PREGI and reassembly afterwards being a snap - seems easier than all those EREGI_REPLACEs! > Here is the code for input: > -------------- cut----------------- > mysql_select_db("falrdb",$con) or die ("nu pot"); * > $chtml=eregi_replace('<',' \[st]',$chtml); * > $chtml=eregi_replace('>','\[dr] ',$chtml); * > $ins= "INSERT INTO continut (cef) VALUES > '$chtml')";$rezins=mysql_db_query("falrdb", $ins, $con); ** > -----------------cut-------------------------- > > Here is the code for output: > > -------------------cut------------------ > > $q="select * from continut"; > > $rez=mysql_db_query("falrdb",$q); ** > $zz=mysql_fetch_row($rez); * > $zz[0]=eregi_replace('\[st]','<',$zz[0]); * > $zz[0]=eregi_replace('\[dr]','>',$zz[0]); * > $zz_fsh=stripslashes($zz[0]); * > echo "$zz[0]"; > > ---------------------cut--------------------------- Do I observe STRIPSLASHES() but no ADDSLASHES()? Recommend the addition of a debug ECHO "<BR>chtml=$chtml~"; (or equivalent) at every line where I have marked *. Recommend the addition of a validation step to assure the MySQL interface calls where I have marked **. The last/only ECHO statement examines the reconstituted HTML link BEFORE the call to STRIPSLASHES() - not the resultant value!? Is cef the first field in continut? > I hope that it will be OK for debugging... If not, I'll send you more Don't hesitate to be 'generous' - the more you show, the better the chance that we'll spot something out of place! Once you have added the above debugging ECHOs, please run the routine and show what happens with a sample that works, and then two or three samples that don't. Regards, =dn --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php