Change loaded data in txt field? & removing spaces and tabs in upload form?

So here is my first question… I’m making a “change enterd data” function, and it works fine. I load 3 fields, name, phone and mail.

Now, what i need to do is REMOVE the <a href=“mailto:”> and </a> part of the data that comes from mail.
K… with me so far?!.. Good, cuz here comes (a part of [the rest just clutters up space]) the code


?>
<input name="mail" type="text" value="<? echo $myrow["mail"]; $mail = str_replace("<a href=>","",$mail); ?>">

So what i want to say here, but can’t in PHP, is “get the info from mail in MySql” and then remove <a href=“mailto:”>, </a> and the actual adress ONCE (sense it’s there once for the actual link AND another time for the “mailto:” part).

Any takers… i’m just out of ideas… belive me, i’ve been at it for some time now :bored:

Second question. In an upload file form that i have –> se the bottom of this thread i want to remove any spaces and tabs or other “illegal” chars so that the filename works when it’s uploaded. Or at least issue a warning to the user that the file was uploaded but the link that was created wont work because of the space, tabs etc.

Is this easy enough to fix??