javascript - One of the PHP posted values is not right -
i have registration form companies, multiple fields. 1 working fine... 1 isn't working added later, , stores same number, can't figure out why.
i've checked:
- default values in mysql database: nothing there.
- pulled value of input js console: it's right field name , pulls right value
- verified there 1 field name: fine.
- looked number gets stored in many included files: can't find it.
the minute submit form, $_post["empresa_cuit "]
carries same number, unrelated put in input field.
here's of code:
the 2 functions are:
function defaultform() { global $url, $url_prefix, $user_prefix; global $root; global $selected; global $id; $empresa = get_empresa($id); $empresa_txt = mysql_fetch_array($empresa); ?> <form method="post" enctype="multipart/form-data" id='update_datos'> <h2>empresa <?php echo $empresa_txt['empresa']; ?></h2> <div class="clearfix"> <label for="empresa">nombre de la empresa</label> <div class="input"> <input type="text" name="empresa" value="<?php echo $empresa_txt['empresa']; ?>" class="required" title="este campo es obligatorio."/> </div> </div> <div class="clearfix"> <label for="empresa_cuit">cuit</label> <div class="input"> <input type="text" name="empresa_cuit" id="empresa_cuit" class="required digits" minlength="11" maxlength="11" title="ingrese los 11 dígitos del cuit, sin guiones." value="<?php //echo $empresa_txt['empresa_cuit'];?>"/> <br /><span class="aclaracion">ingrese sólo números.</span> </div> </div> <div class="clearfix"> <label for="empresa_tel">teléfono</label> <div class="input"> <input type="text" name="empresa_cod_tel" id="empresa_cod_tel" maxlength="6" size="6" class="required digits areacode" value="<?php echo $empresa_txt['empresa_cod_tel']; ?>" title="debe ingresar un código de área válido (sólo números)."/> <input type="text" name="empresa_tel" class="required digits" value="<?php echo $empresa_txt['empresa_tel']; ?>" title="debe ingresar un teléfono válido (sólo números)."/> </div> </div> <input name="submit" type="submit" value="actualizar" class='white button'/> <input name="filter" type="hidden" value="processform"> <!-- hidden value points switch processing --> </form> <?php return; } #/ end of defaultform ?>
-
function processform() { echo $empresa_cuit = intval($_post['empresa_cuit']);
...
i've moved line top, can monitor value right away. rest of function irrelevant after that, shows same number! number has phone number format, thought might have been related phone fields (empresa_cod_tel , empresa_tel), doesn't matter put in there, number in cuit field remains same.
could me troubleshoot more? can't paste every related piece of code in here now, let me know if you'd see else...
my thought this: if using 32 bit integer , phone number entering evaluates greater 2147483647, intval return 2147483647.
i'd change store phone number string.
Comments
Post a Comment