Problem with php and mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

One of our customers has written a php application that we are hosting.

Basically, there is a province/state table which populates a combo box.
When the form containing this combo box is submitted, the information is
added into the database.

The problem is that when nothing is selected from the combo box, it adds a
number which seems to be random in the database, rather than the
province/state ID which it references from the province table. Obviously
there are many methods of avoiding this such as javascript to make sure
something is selected, or even giving the combo box a default value, but I
was wondering if anyone knew why the database itself isn't catching the
error (foreign key violation) and accepting the data.

Any ideas?

Thanks in advance for any help,
Kevin

-----------------------------------
           Kevin Demers
     Technical/Customer Support
    Internet Access - WORLDWIDE
        3 East Main Street
Welland, ON          Canada L3B 3W4
(905) 714-1400       (800) 560-4560
kevind@iaw.on.ca     www.iaw.on.ca


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux