split fone number and add to database..
Moderator: General Moderators
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact:
split fone number and add to database..
I have a form that asks for your fone number and what I want to do is have three text boxs for that number How would I do this and be able to add it to the same database field becuase I can only figuare out how to do it if I have three database fields for the number and I don't want that..
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
Well, you'll call these fields phone1, phone2, and phone3 or something.
The customer will fill in the form and press submit. On the form processing page, make a new variable $phone that concatenates all three form variables.
$phone = $_POST["phone1"] . $_POST["phone2"] . $_POST["phone3"];
The phone number will look like 1112223333, if they entered in 111 and 222 and 3333 in the boxes.
The customer will fill in the form and press submit. On the form processing page, make a new variable $phone that concatenates all three form variables.
$phone = $_POST["phone1"] . $_POST["phone2"] . $_POST["phone3"];
The phone number will look like 1112223333, if they entered in 111 and 222 and 3333 in the boxes.
-
seeker2921
- Forum Contributor
- Posts: 120
- Joined: Sat Mar 22, 2003 7:10 pm
- Location: Wiesbaden Germany
- Contact: