![]() |
not updating correctly, completely wrong number
well im submitting the number 7327060765 but when it passes through php and is finally placed in the database it is: 2147483647. and that is the same number in the database for any combination of numbers i use>_< can someone explain y its doing this?
my code is: PHP Code:
|
Quote:
|
field is 11 intergers;)
|
Quote:
Amy |
how would i do that? cause i want to make sure the sure its 10 numbers long:)
|
Quote:
Unless it can start with 0 and then you should probably make it a string and not an integer. Amy |
im going to assume area codes dont start with 0...?
|
area codes can start with zero if your dialing internationally.
011+xxxxxxxxxx whatevfer |
ok i guess i can it that way since currently my script only works within the US:) and requires no international dialing:D
|
its still putting the same exact number in!
|
bump!
|
is it possible that its getting put in wrong due to the cell phone fields being on the same page as edit password and edit email? because that is where its located
|
bump it like its hot, bump it like its hot!
|
what is your query to insert the data into the database?
|
the query is:
PHP Code:
|
If it's always the same number going in, make sure your form is set up correctly and that it's not passing a constant value somehow.
It's really difficult to help people debug when you don't have access to the actual running code. |
here is the template:
HTML Code:
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script> |
Put in the values. Right now you have blanks. Do it just like the email and emailconfirm. Also, make sure you initialize those variables before you retrieve them from the post. When you use them in the script, you should be using
Code:
$_Post[cellnum] |
so globalize could be messing everything up?
|
ok tried it using $_POST but it still puts that same weird number into the database, i dont understand y!!!!
|
anyone know y?
|
You have the field defined as a signed interger - the maximum value for a signed integer field in mysql is 2147483647, if you try and put anything bigger than this in, it will just set the field to this maximum value.
|
Quote:
|
Quote:
|
Quote:
|
ok i changed the field to tinytext but its still doing it, could it be because the server or intval() is being overwhelmed by the #?
|
Quote:
Quote:
|
Quote:
|
Do not treat a phone number as a literal number, especially because the format varies by country. Store it as a string, unless your PHP script connects to a phone and calls it. You can always use regular expressions to parse it to whatever form you want later.
For the US, you can store it as nnn-nnn-nnnn, including the dashes. |
Quote:
|
Quote:
Don't think of the phone number as a number. Just a series of characters that happen to be digits. |
All times are GMT. The time now is 01:56 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|