Rewrite value from form data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux