Jump to content

nonexistentera

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nonexistentera's Achievements

Member

Member (2/5)

0

Reputation

  1. Alright this is kinda an odd thing, so I need some help. I have a table "quote" with the three columns `id`, `quote`, and `author`. Now I am wondering if there is anyway that I can output all the different values in the column `author`, and if a repeat is found, not to display it again. I know I can do this in a for loop, but I know there is a better way to do it. Always is. Any help or suggestions are always greatly appreciated. Thanks in advanced. --nonexistentera
  2. Perfect. Love it. Exactly what I needed. Thank you, --nonexistentera
  3. Hello, I am wondering if there is a service/script out there that can validate my entire website. I am wondering this because the entire site needs to be valid at all times. If not, is there anyway to create a script that can crawl the entire site and test each page. Thanks in advance for any advice. --nonexistentera
  4. While I was searching through one of my favorite sites, I came across something interesting. You can replace the ID with just about anything. http://www.ultimate-guitar.com/tabs.php?id=20238 There is a little thing that says [DB LOG] which shows the time, status, rows, and other things for each query. I am wondering if there is any actual script out there that does this, or is this just something I am going to need to make myself. --nonexistentera
  5. Well thank you for your suggestion. I did exactly as you said, and it still didn't work. After a few cups of coffee, and some holes in the wall, I finally found the issue. I have a function that deletes users that have not been confirmed after 24 hours, and this is added into my database connection function. I had the function in my global call file setting clean as true, which deleted the user once the file was called. This was my bad XD Thank you for your help, I have always liked this community Thanks -nonexistentera
  6. I have no idea how this happens. I have tried the SQL straight through phpMyAdmin and it works perfectly, but yet when I try it through the script, it deletes the row instead of just updating it. It is set into a function below function Confirm(){ global $HTTP_SERVER_VARS, $user_info; $id = $_GET["id"]; $md5 = $_GET["secret"]; if (!$id) httperr(); $res = mysql_query("SELECT passhash, editsecret, status FROM users WHERE id = $id"); $row = mysql_fetch_array($res); if (!$row) httperr(); if ($row["status"] != "pending") { header("Refresh: 0; url=/ok?type=confirmed"); exit(); } $sec = hash_pad($row["editsecret"]); if ($md5 != md5($sec)) httperr(); $updateSQL = "UPDATE `users` SET `status` = 'confirmed' WHERE `id` =".$id." LIMIT 1 "; mysql_query($updateSQL) or die(mysql_error()); logincookie($id, $row["passhash"]); header("Location: /ok?type=confirm"); } I have tried the $updateSQL and it returns no errors, but the mysql_query is deleting it. Any thoughts on why this would be doing this ???
  7. Is there a way to do this. Like if the original string was Great job. Amazing and went through nl2br to become Great job. <br /> Amazing is there anyway to revert back to the original formatting. I guess what Im asking is if there is a way to go from <br /> to \n and showing the string in it's original form of Great job. Amazing I was thinking of preg_match or something along the lines of that.
  8. Alright I have right now RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?action=$1 [L,QSA] so any call to /resource will result in index.php?action=resource I am wondering how I can do this in reverse to do a redirect from index.php?action=resource to /resource. It seems like the code below would work, but I haven't gotten anything RewriteRule ^index.php?action=(.+)$ ./$1 [R=302,NC] Any help would be much appreciated. Thanks -nonexistentera
  9. For some reason that slipped my mind. It's brilliant. After some time of working with mod_rewrite I finally have it running smoothly. Now for the php side. Thank you for giving me some extra common sense. oh BTW, Nice sig
  10. Well I mean like it will be ?action=browse let's say and there are categories, and sub categories, so ?action=browse&cat=3&subcat=2 So lets say 3 is Software, and the sub category is PHP. There would be Home>Browse>Software>PHP Then the user can go to the category software, or the browse section. I think I just saw what I needed, so I will see what I can think up.
  11. Hello. I have been searching around for something that could meet my needs, but as of which have not found anything. I have all my url's layed out as so index.php?action=requestedAction Which apache rewrites to /requestedAction I am not sure how I could create a breadcrumb trail for this, or where to really begin. Anyone knowledgeable on this :/ Thanks for anything in advance -nonexistentera
  12. Finally got it. You can close this topic I decided to use the requested URI, then this doesn't create an endless lood, as once it gets to the 'pretty' page, it stops $text = $_SERVER['REQUEST_URI']; if (preg_match("/\baction=\b/i", $text)) { header('Location: http://www.x00n.com/' . $_GET['action']); } else { }
  13. Well im guessing it is still being passed since the rewrite calls the same url, just in 'pretty' terms.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.