in reply to Re^3: Unable to pass 0 number through form with CGI DBI backend
in thread Unable to pass 0 number through form with CGI DBI backend

i want to keep the zeros in the field as zeros ,i dont wanna loose them suppose some one enters 7890123456 ,in db also it should be 7890123456 (!)not 789123456 . Now how can i not lose those zeros when passing from a cgi script 7890123456 ->turns into->789123456.Thats not what i want i want perfectly intact data
  • Comment on Re^4: Unable to pass 0 number through form with CGI DBI backend

Replies are listed 'Best First'.
Re^5: Unable to pass 0 number through form with CGI DBI backend
by marto (Cardinal) on Sep 12, 2015 at 11:07 UTC

    If you read my first reply you'd see this has nothing to do with passing data from CGI, or DBI. I demonstrate that you're stripping the zeros ($mob =~ s/[:;$%&@<>?]//gi;). My example shows that basic debugging will show you that your code isn't doing what you think it is. If you're going live with some critical service tomorrow (as you mentioned) this would be a warning flag for me regarding what you're delivering. For the immediate issue consider the solution presented by poj.