homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Added phone number field to web form
having trouble getting it to write into DB

WebmasterWorld Senior Member 10+ Year Member

Msg#: 4434960 posted 8:02 pm on Mar 29, 2012 (gmt 0)

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...



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

Msg#: 4434960 posted 4:43 pm on Mar 30, 2012 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved