Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Added phone number field to web form

having trouble getting it to write into DB



8:02 pm on Mar 29, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I successfully added phone_number to my web form.

Then included this on the index.cgi
$sql{phone_number } = $in{phone_number} || $in{phone_number } || '';

However, I can't get the phone number to write into the database correctly. I have minimal programming skills and tried a variety of different things (see below).

for ($sql{phone_number}) {
s/[^\d.-]//g; # only digits and dots and dashes

The above yields the same number no matter what is input. Any input? Thanks...


4:43 pm on Mar 30, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

This is likely more of a Perl problem than database - we'll need to see two bits of code:

- how the form input "gets" to the variables
- the insert statement and how it works

Please don't post the whole script, just the bits you see as relevant.

Featured Threads

Hot Threads This Week

Hot Threads This Month