Rewrite value from form data
| From: | Vincent Jordan | Date: | Sat, 17 Jul 2004 16:44:46 +0000 |
| Subject: | Rewrite value from form data | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35335@lists.php.net to get a copy of this message | ||
I have a form with a field for a telephone number. I would like to
either apply some kind of formatting to force format of XXX-XXX-XXXX or
rewrite after submit to insert - in 3 and 5 (or 6).
Here is what I have for code:
--Form-
<td>Home Phone:</td>
<td><input type="text" name="home_phone" id="home_phone"
size="15" tabindex="8" /></td>
handler.php
$home = $_POST['home_phone'
I have tried str_replace() however im not using it correctly or it is
not the correct string to use for this