$temp_table_create = "
CREATE TEMPORARY TABLE IF NOT EXISTS `temp_del_log` (
`removerid` int(10) unsigned NOT NULL default '0' COMMENT 'konuyu silenin id',
`removername` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'konuyu silenin ismi',
`deletedid` int(10) unsigned NOT NULL default '0' COMMENT 'konusu silinenin id',
`deletedname` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'konusu silinenin ismi',
`type` enum('post','thread') collate utf8_unicode_ci NOT NULL default 'thread' COMMENT 'tür',
`prefix` varchar(250) collate utf8_unicode_ci NOT NULL COMMENT 'silinen konu ismi',
`title` varchar(250) collate utf8_unicode_ci NOT NULL COMMENT 'silinen konu başlığı',
`reason` varchar(125) collate utf8_unicode_ci NOT NULL COMMENT 'silinme sebebi',
`dateline` int(10) unsigned NOT NULL default '0' COMMENT 'silinme tarihi',
KEY `type` (`type`,`dateline`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
";
$temp_table_insert =
"INSERT INTO temp_del_log (removerid, removername, deletedid, deletedname, type, prefix, title, reason, dateline)
VALUE('5', 'zodehala', '20', 'tom', 'thread', 'thread', 'delete', 'not important', '".time()."')";
mysql_query($temp_table_create)or die (mysql_errno()."<br/>".mysql_error());
mysql_query($temp_table_insert)or die (mysql_errno()."<br/>".mysql_error());
Logically the code is doing some unnecessary things. The queries to create and insert the data into the temporary table are executed each time the page is fetched. So, when the page is first visited, the temporary table is created and the row inserted, but this is not used and the temporary table is deleted when the script ends (when the connection to the database server is closed.) Then when you click on the link and the page is requested again, the temporary table is created again and the row inserted again. This logic should be changed so that the temporary table is only created/inserted when the switch/case statement matches a value where you want to use the temporary table.
The code also does not have any error checking on the mysql_query() in the switch/case statement, so if that query should fail, the code won't output what you expect.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
If you are getting no echoed output in FF, it is because of the missing > on the end of the link. The HTML is broken and the "tom" output is present in the "view source" but is not rendered by the browser.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Logically the code is doing some unnecessary things. The queries to create and insert the data into the temporary table are executed each time the page is fetched. So, when the page is first visited, the temporary table is created and the row inserted, but this is not used and the temporary table is deleted when the script ends (when the connection to the database server is closed.)