Código PHP:
CREATE TABLE `notas` (
`notasID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`userID` int(10) UNSIGNED NOT NULL,
`posterTime` int(10) UNSIGNED NOT NULL,
`posterIP` tinytext NOT NULL,
`titulo` tinytext NOT NULL,
`cuerpo` text NOT NULL,
`tags` varchar(16) DEFAULT NULL,
`categoria` varchar(16) NOT NULL,
`visitasID` mediumint(8) unsigned NOT NULL auto_increment,
`visitasIP` tinytext NOT NULL,
PRIMARY KEY (`notasID`),
KEY `FK_notas_1` (`userID`),
FOREIGN KEY (`userID`) REFERENCES `usuarios` (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Código PHP:
$sql="INSERT INTO notas (notasID ,userID,posterTime,posterIP,titulo,cuerpo,tags,categoria)VALUES (NULL , '$userID', '$time', '$ip', '$titulo', '$cuerpo', '$tags', '$categoria')";
Muchas gracias espero que me entiendan...