Hi
I've created a table which contains various fields ten of which are for images where I want to store the image name ie 1.jpg I've set the default in the table design to be noimage.jpg
However when I fill out the web form and post to create a new record if I leave the upload field for images blank then no default image is shown in the table when viewed in phpmyadmin.
Is my issue with my table design of the web page php uplaod sequence?
I listed the table below
thanks
Ian
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`UserID` int(11) NOT NULL auto_increment,
`UserEmail` varchar(500) default NULL,
`UserPassword` varchar(500) default NULL,
`UserFirstName` varchar(50) default NULL,
`UserLastName` varchar(50) default NULL,
`UserCity` varchar(90) default NULL,
`UserState` varchar(20) default NULL,
`UserZip` varchar(12) default NULL,
`UserContactHours` varchar(12) default NULL,
`UserEmailVerified` tinyint(1) default '0',
`UserRegistrationDate` timestamp NULL default CURRENT_TIMESTAMP,
`UserVerificationCode` varchar(20) default NULL,
`UserIP` varchar(50) default NULL,
`UserPhone` varchar(20) default NULL,
`UserFax` varchar(20) default NULL,
`UserCountry` varchar(20) default NULL,
`UserAddress` varchar(100) default NULL,
`UserAddress2` varchar(50) default NULL,
`UserSex` varchar(20) default NULL,
`UserEthnicity` varchar(20) default NULL,
`UserAge` varchar(20) default NULL,
`UserTypes` varchar(20) default NULL,
`UserArea` varchar(20) default NULL,
`UserImage1` varchar(20) default 'noimage.jpg',
`UserImage2` varchar(20) default 'noimage.jpg',
`UserImage3` varchar(20) default 'noimage.jpg',
`UserImage4` varchar(20) default 'noimage.jpg',
`UserImage5` varchar(20) default 'noimage.jpg',
`UserImage6` varchar(20) default 'noimage.jpg',
`UserImage7` varchar(20) default 'noimage.jpg',
`UserImage9` varchar(20) default 'noimage.jpg',
`UserImage8` varchar(20) default 'noimage.jpg',
`UserImage10` varchar(20) default 'noimage.jpg',
`UserEyeColour` varchar(20) default NULL,
`UserHairColour` varchar(20) default NULL,
`UserHips` varchar(20) default NULL,
`UserWaist` varchar(20) default NULL,
`UserBustChest` varchar(20) default NULL,
`UserHeight` varchar(20) default NULL,
`UserWeight` varchar(20) default NULL,
`UserHatSize` varchar(20) default NULL,
`UserDressSize` varchar(20) default NULL,
`UserSmoker` varchar(20) default NULL,
`UserDistinguishingFeatures` varchar(50) default NULL,
`UserShoeSize` varchar(20) default NULL,
`UserGloveSize` varchar(20) default NULL,
`UserModellingExperience` varchar(50) default NULL,
PRIMARY KEY (`UserID`)
) ENGINE=MyISAM AUTO_INCREMENT=127 DEFAULT CHARSET=latin1;
-- ----------------------------
I've created a table which contains various fields ten of which are for images where I want to store the image name ie 1.jpg I've set the default in the table design to be noimage.jpg
However when I fill out the web form and post to create a new record if I leave the upload field for images blank then no default image is shown in the table when viewed in phpmyadmin.
Is my issue with my table design of the web page php uplaod sequence?
I listed the table below
thanks
Ian
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`UserID` int(11) NOT NULL auto_increment,
`UserEmail` varchar(500) default NULL,
`UserPassword` varchar(500) default NULL,
`UserFirstName` varchar(50) default NULL,
`UserLastName` varchar(50) default NULL,
`UserCity` varchar(90) default NULL,
`UserState` varchar(20) default NULL,
`UserZip` varchar(12) default NULL,
`UserContactHours` varchar(12) default NULL,
`UserEmailVerified` tinyint(1) default '0',
`UserRegistrationDate` timestamp NULL default CURRENT_TIMESTAMP,
`UserVerificationCode` varchar(20) default NULL,
`UserIP` varchar(50) default NULL,
`UserPhone` varchar(20) default NULL,
`UserFax` varchar(20) default NULL,
`UserCountry` varchar(20) default NULL,
`UserAddress` varchar(100) default NULL,
`UserAddress2` varchar(50) default NULL,
`UserSex` varchar(20) default NULL,
`UserEthnicity` varchar(20) default NULL,
`UserAge` varchar(20) default NULL,
`UserTypes` varchar(20) default NULL,
`UserArea` varchar(20) default NULL,
`UserImage1` varchar(20) default 'noimage.jpg',
`UserImage2` varchar(20) default 'noimage.jpg',
`UserImage3` varchar(20) default 'noimage.jpg',
`UserImage4` varchar(20) default 'noimage.jpg',
`UserImage5` varchar(20) default 'noimage.jpg',
`UserImage6` varchar(20) default 'noimage.jpg',
`UserImage7` varchar(20) default 'noimage.jpg',
`UserImage9` varchar(20) default 'noimage.jpg',
`UserImage8` varchar(20) default 'noimage.jpg',
`UserImage10` varchar(20) default 'noimage.jpg',
`UserEyeColour` varchar(20) default NULL,
`UserHairColour` varchar(20) default NULL,
`UserHips` varchar(20) default NULL,
`UserWaist` varchar(20) default NULL,
`UserBustChest` varchar(20) default NULL,
`UserHeight` varchar(20) default NULL,
`UserWeight` varchar(20) default NULL,
`UserHatSize` varchar(20) default NULL,
`UserDressSize` varchar(20) default NULL,
`UserSmoker` varchar(20) default NULL,
`UserDistinguishingFeatures` varchar(50) default NULL,
`UserShoeSize` varchar(20) default NULL,
`UserGloveSize` varchar(20) default NULL,
`UserModellingExperience` varchar(50) default NULL,
PRIMARY KEY (`UserID`)
) ENGINE=MyISAM AUTO_INCREMENT=127 DEFAULT CHARSET=latin1;
-- ----------------------------