Jump to content


Photo

Phone Number Retrieval


  • Please log in to reply
6 replies to this topic

#1 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 02 August 2003 - 06:45 AM

Can anyone tell me how i can get my database to retrieve full phone numbers without asking my users to type their phone numbers without spaces. The only information that gets to my database is the numbers before the a space or dash.

Example:
312-432-5932 or 312 432 5932

My database only recieves the \"312\" which are the numbers before the space. I will be very greatfull if someone can help me wit this. Thanx

#2 lonerngraus

lonerngraus
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 August 2003 - 08:50 AM

Hey,

I\'m new at this also, but I would have \"thought\" that on the form you could seperate the area code, phone number etc.. limit the field sizes to the number of digitis required.. and place some javascript to ensure they entered in the required number of digits. That way you could append the data together, and send it off as a single digit?

Cheers

#3 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 03 August 2003 - 03:44 AM

Alright thanx i did that. but how do i go about appending the data in those three seperate forms to the same record in the database?

#4 holiks

holiks
  • Members
  • PipPipPip
  • Advanced Member
  • 83 posts

Posted 03 August 2003 - 04:20 PM

..maybe something along the lines of....
<form><input type="text" size="3" name="areacode" maxlength="3">-<input type="text" size="3" name="number1" maxlength="3">-<input type="text" size="4" name="number2" maxlength="4"><br><input type="submit" value="submit"></form>

__________________________________________________________[br]$php = array('..a stack', '...once you pop', '...you don't stop');

#5 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 03 August 2003 - 09:02 PM

thanx but i already did that but the database is only recieving the last 4 digits of the phone number. which is \"number2\" in your example. the information in \"areacode\" and \"number1\" is lost. Should I change the record values in the database or should i make seperate records for \"area code\", \"number1\", and \"number2\" in the database.

#6 BinaryStar

BinaryStar
  • Staff Alumni
  • Advanced Member
  • 74 posts
  • LocationBethlehem, PA

Posted 04 August 2003 - 12:29 AM

just go like this...

[php:1:c2d757dd8a]<?php
$complete_phone = $area_code . $number1 . $number2;
?>[/php:1:c2d757dd8a]

BS :D

#7 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 04 August 2003 - 03:28 AM

thanx alot I really appreciate you guys help.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users