I'm having some troubles when editing an admin on my script.
For example when the username stays the same, I get the 'username exists' message.
is_admin();
require '../lib/config.php';
connectcp();
$result = mysql_query("SELECT...
U have this in the HEAD section of my web page:
<!--
function confirmation() {
var answer = confirm("Are you sure you want to delete this folder?")
if (answer){
alert("Bye bye!")
window.location = "http://www.google.com/";
}
else{
alert("Thanks for sticking around!")
}
}
//-->...
I'm trying pagination. It works fine, except the 'unhyperlinked' page numbers are 'unhyperlinked' one off.
To see what I mean click here.
I can't seem to fix it. Here is my code:
$result = mysql_query("SELECT * FROM test");
$total_entries = mysql_num_rows($result);
echo...
Okay, I got it to work:
if ($handle = opendir($loc)) {
while (false !== ($file = readdir($handle))) {
if (is_dir($loc.$file)) continue;
if ($file != "." && $file != "..") {
$thelist .= "$file"...
I added this to check if username exists when adding administrator on my site:
$result = mysql_query("SELECT username from admin where username='$username'");
list($usernametocheck) = mysql_fetch_row($result);
if (!$usernametocheck) {...
I'm using this code to censor my message on my site:
$fp = fopen("banned.txt","r");
while($word = fgets($fp,10000)) {
$str3 = ereg_replace(trim($word),"<censored>",$str3);
}
Right now the word list are stored on a text file delimited with line breaks. I'm changing it to mysql. The...
And I don't know if this is much help, but viewing the cookies in Firefox I see this:
Name: admin
Value: CALV1N
Host: Localhost
Path: /calvin/cp/
Thanks.
-CALV1N
okay, so I kind of tweaked the code you've provided, and it still doesn't display the message, even though I am logged in:
if ($isprivate == "1") {
if (!empty($_COOKIE[admin])) {
echo nl2br($message);
} else {
echo "<i>This message has been marked private. You must log in as an...
Yeah, but I don't know how to add if (!empty($_COOKIE['$cookiename'])) { to see if the admin is logged in to display the message.
When a user posts, there is an option if he/she wants the message to be private, requiring an admin to be logged in.
Like I said 1=yes and 0=no. That is the...
I have a problem with this code I'm using:
//if (!empty($_COOKIE['$cookiename'])) {
if ($isprivate != "1") {
$message = nl2br($message);
echo "$message";
} else {
echo "<i>This message has been...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.