-
Posts
1,686 -
Joined
-
Last visited
Never
About Lamez
- Birthday 07/25/1990
Contact Methods
-
AIM
lilpimpdaddy725
-
MSN
dragonchamberr@hotmail.com
-
Website URL
http://www.krazypickem.com
-
Yahoo
wizkid916@yahoo.com
Profile Information
-
Gender
Male
-
Location
Lubbock
Lamez's Achievements

Advanced Member (4/5)
0
Reputation
-
My first name is James. If you take the J and turn it around, you get a L. Same with the S, turn it around you get a Z.
-
www.servage.net
-
that last idea could work. but they way I can tell if a topic is sticky or empty is by putting a one in the the column so if sticky = 1 topic is sticky same with the locked structure: could I still use that code if I changed it to 1's and 0's from trues and false?
-
Making frames disappear after logging out
Lamez replied to mistertylersmith's topic in PHP Coding Help
why don't you just include a menu on your head file? -
why don't you install mysql and phpmyadmin?
-
in my query I have it to order by sticky, locked, datetime, and then id. well if I have a topic that is sticky, and locked, and one that is just sticky and unlocked it puts the unlocked on bottom between the two. This is what I wanted, however when it is just two regular topics, it order the locked one above the unlocked one. I want it to order like it would be if it was just datetime. I am kinda lost, and I am pretty sure this topic did not make sense to anyone who reads it. here is my query: $sql="SELECT * FROM $tbl_name ORDER BY sticky DESC, locked DESC, datetime DESC, id DESC";
-
<?php mysql_query("UPDATE `table` SET `value` = 'this', `anothervalue` = 'that' WHERE `id` = 'id'"); ?>
-
TOPIC SOLVED, lol why not just use isset's? finished code: <?php include ("../../style/include/session.php"); if($session->isAdmin()){ $tbl_name="forum_question"; $tbl_name2="forum_answer"; $id = $_POST['id']; if (isset ($_POST['lockt'])){ mysql_query("UPDATE $tbl_name SET locked = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if (isset ($_POST['unlockt'])){ mysql_query("UPDATE $tbl_name SET locked = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if (isset ($_POST['stick'])){ mysql_query("UPDATE $tbl_name SET sticky = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if (isset ($_POST['unstick'])){ mysql_query("UPDATE $tbl_name SET sticky = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if (isset ($_POST['dele'])){ mysql_query("DELETE FROM $tbl_name WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=main_forum.php">'; } }else{ echo "NOT ADMIN"; } ?>
-
why, if it works, then use it.
-
duh == well that fixed the logout problem, but now it does not go through the process, say I try to stick a topic, it will not do it, and it does not redirect. new code: <?php include ("../../style/include/session.php"); if($session->isAdmin()){ $tbl_name="forum_question"; $tbl_name2="forum_answer"; $lock = "lockt"; $unlock = "unlockt"; $stick = "stick"; $unstick = "unstick"; $dele = "dele"; $id = $_POST['id']; if ($lock == ($_POST['lockt'])){ mysql_query("UPDATE $tbl_name SET locked = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($unlock == ($_POST['unlockt'])){ mysql_query("UPDATE $tbl_name SET locked = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($stick == ($_POST['stick'])){ mysql_query("UPDATE $tbl_name SET sticky = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($unstick == ($_POST['unstick'])){ mysql_query("UPDATE $tbl_name SET sticky = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($dele == ($_POST['dele'])){ mysql_query("DELETE FROM $tbl_name WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=main_forum.php">'; } }else{ echo "NOT ADMIN"; } ?>
-
kinda, what about a IF statment? if ($lvl == ('1')){ do somthing }
-
function isAdmin(){ return ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME); } in session.php
-
could you rephrase the question. are you asking how to get a page depending on what is sent through the drop down box?
-
<?php $lvl = $_GET['level']; echo $lvl; ?> output: 1 any help?
-
I have add '$id' now, but same thing happens. <?php include ("../../style/include/session.php"); if($session->isAdmin()){ $tbl_name="forum_question"; $tbl_name2="forum_answer"; $lock = "lockt"; $unlock = "unlockt"; $stick = "stick"; $unstick = "unstick"; $dele = "dele"; $userid = "userid"; $id = $_POST['id']; if ($lock = ($_POST['lockt'])){ mysql_query("UPDATE $tbl_name SET locked = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($unlock = ($_POST['unlockt'])){ mysql_query("UPDATE $tbl_name SET locked = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($stick = ($_POST['stick'])){ mysql_query("UPDATE $tbl_name SET sticky = '1' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($unstick = ($_POST['unstick'])){ mysql_query("UPDATE $tbl_name SET sticky = '0' WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=view_topic.php?id='.$id.'">'; } if ($dele = ($_POST['dele'])){ mysql_query("DELETE FROM $tbl_name WHERE id = '$id'") or die(mysql_error()); print '<meta http-equiv="refresh" content="0;url=main_forum.php">'; } } ?>