Hi, please see the following red code... it adds info to a MySQL Table called 
"Schools". Whats the problem? Although the first time you execute it, it works, after 
the first time you send the form you get ERROR. 

    $qs = 'INSERT INTO Schools (LongName, Abbreviation) VALUES (' .
      "'" . addslashes(trim($longname)) . "'," .
      "'" . addslashes(trim($abbrev)) . "')";

    if(!mysql_query($qs, $db))
      echo '<font color="red"><b>Error</b></font><br />';


And this is the CODE of the "Schools" Table

CREATE TABLE Schools (
SchoolID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
ShortName varchar(15) DEFAULT '' NOT NULL,
LongName varchar(60),
Abbreviation varchar(10),
Approved tinyint(1) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (SchoolID),
KEY Approved (Approved),
KEY ShortName (ShortName),
UNIQUE ShortName_2 (ShortName)
);

It seems that the problem resides in ShortName.... but I still don´t understand what 
to do...

Thanks a lot!!!!!!!
Francisco
_________________________________________ 
Francisco Mosse - [EMAIL PROTECTED]
- Webmaster de http://www.alipso.com 
- Centro de Capacitación DELFOS (http://www.delfosweb.com.ar). 4821-3353 / 4823-9334
- http://www.TangoStore.com 4371-7500 
_________________________________________

Reply via email to