|
Posted by omniogroup@yahoo.com on 10/08/05 00:04
Setting:
One Database, One Table
CREATE TABLE `rss` (
`rssID` int(11) NOT NULL auto_increment,
`Name` varchar(100) default NULL,
`URL` varchar(255) default NULL,
`Cat` varchar(100) default NULL,
`ts` timestamp(14) NOT NULL,
`Com` blob,
`spName` varchar(100) default '',
`spURL` varchar(255) default '',
`sp` varchar(5) default '',
PRIMARY KEY (`rssID`)
) TYPE=MyISAM;
I have text boxes (which insert into Name, URL ) on my webpage. When a
user clicks a checkbox however, I want this same data inserted into
spName, spURL. That's it!
How can I do this using the traditional Insert code that Dreamweaver
generates?
$insertSQL = sprintf("INSERT INTO rss (Name, URL, Cat, Com, sp)
VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['Name'], "text"),
GetSQLValueString($_POST['Url'], "text"),
GetSQLValueString($_POST['Cat'], "text"),
GetSQLValueString($_POST['com'], "text"),
Do I do a if condition??
Any help would be great!
[Back to original message]
|