Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. calv1n

    checking if username exists (when editing u/n)

    Thank you for your help. I fixed it. :-D -CALV1N
  2. calv1n

    checking if username exists (when editing u/n)

    i.e if they try to change their name to another one which already exists. -CALV1N
  3. calv1n

    checking if username exists (when editing u/n)

    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...
  4. calv1n

    javascript confirm help

    Sorry, I don't know how to use JavaScript. :-( -CALV1N
  5. calv1n

    javascript confirm help

    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!") } } //-->...
  6. calv1n

    pagination

    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...
  7. calv1n

    Using PHP to Access MySQL

    $query = "select * from access_log;"; should be: $query = "select * from access_log"; -CALV1N
  8. calv1n

    display files in directory

    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"...
  9. calv1n

    display files in directory

    How do I display the files of a directory, but just the files, not any subdirectories? Thanks. -CALV1N
  10. calv1n

    checking if name exists

    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) {...
  11. calv1n

    censoring

    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),"&lt;censored&gt;",$str3); } Right now the word list are stored on a text file delimited with line breaks. I'm changing it to mysql. The...
  12. calv1n

    Cookie question

    How do I print the time to the cookie expires? -CALV1N
  13. calv1n

    if statement help

    Thank you, I fixed it. -CALV1N
  14. calv1n

    if statement help

    lol I had to change the cookie path! DUH!!! Thanks, jpadie for all your help!! -CALV1N
  15. calv1n

    if statement help

    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
  16. calv1n

    if statement help

    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...
  17. calv1n

    if statement help

    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...
  18. calv1n

    if statement help

    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...

Part and Inventory Search

Back
Top