| InterplotAdmin | 2006-03-30 20:09:00 |
![]() Posts: 3 Topics participated: 3 Topics started: 2 First post: 2006-03-30 18:58:00 Last post: 2006-03-30 20:09:00 |
i tried this but now it says Warning: Cannot modify header information - headers already sent by (output started at /home/admin/public_html/categorie.php:5) in /home/admin/public_html/include/bittorrent.php on line 339 and the line is up to 118? |
![]() |
Category Manager
| Skeicior | 2006-04-27 15:27:00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() Posts: 1 Topics participated: 1 Topics started: 0 First post: 2006-04-27 15:27:00 Last post: 2006-04-27 15:27:00 |
What is wrong is this code? When i edit/delete I see home page :/ php
ob_start(); require_once("include/bittorrent.php"); dbconn(false); loggedinorreturn(); if (get_user_class() < UC_SYSOP) { die("Access denied."); } mysql_connect($mysql_host,$mysql_user,$mysql_pass); mysql_select_db($mysql_db); stdhead("Categories"); begin_frame("Categories", center); ///////////////////// D E L E T E C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\ $sure = $_GET['sure']; if($sure == "yes") { $delid = $_GET['delid']; $query = "DELETE FROM categories WHERE id='$delid' LIMIT 1"; $sql = mysql_query($query); echo("Category succesfully deleted! [ Back ]"); end_frame(); stdfoot(); die(); } $delid = $_GET['delid']; $name = $_GET['cat']; if($delid > 0) { echo("Are you sure you would like to delete this category? ($name) ( Y / N )"); end_frame(); stdfoot(); die(); } ///////////////////// E D I T A C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\ $edited = $_GET['edited']; if($edited == 1) { $id = $_GET['id']; $cat_name = $_GET['cat_name']; $cat_img = $_GET['cat_img']; $query = "UPDATE categories SET name = '$cat_name', image = '$cat_img' WHERE id='$id'"; $sql = mysql_query($query); if($sql) { echo("
end_frame(); stdfoot(); die(); } } $editid = $_GET['editid']; $name = $_GET['name']; $img = $_GET['img']; if($editid > 0) { echo(""); end_frame(); stdfoot(); die(); } ///////////////////// A D D A N E W C A T E G O R Y \\\\\\\\\\\\\\\\\\\\\\\\\\\\ $add = $_GET['add']; if($add == 'true') { $cat_name = $_GET['cat_name']; $cat_img = $_GET['cat_img']; $query = "INSERT INTO categories SET name = '$cat_name', image = '$cat_img'"; $sql = mysql_query($query); if($sql) { $success = TRUE; } else { $success = FALSE; } } print("Add A New Category!"); print(" "); print(" "); echo(""); ///////////////////// E X I S T I N G C A T E G O R I E S \\\\\\\\\\\\\\\\\\\\\\\\\\\\ print("Existing Categories:"); print(" "); print(" "); echo("
Similar threads
Statistics
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||













