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

**URL:** <https://forum.kirupa.com/t/change-loaded-data-in-txt-field-removing-spaces-and-tabs-in-upload-form/156494>\
**Category:** Uncategorized\
**Created:** [July 26, 2005, 7:37am UTC](https://forum.kirupa.com/t/change-loaded-data-in-txt-field-removing-spaces-and-tabs-in-upload-form/156494 "2005-07-26T07:37:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forum.kirupa.com/u/Azazel)\
**Post date:** [July 26, 2005, 7:37am UTC](https://forum.kirupa.com/t/change-loaded-data-in-txt-field-removing-spaces-and-tabs-in-upload-form/156494/1 "2005-07-26T07:37:38Z")

</div>

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

```php

?>
<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](http://www.kirupa.com/forum/showthread.php?t=185936) 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??
