0x00
Members-
Posts
120 -
Joined
-
Last visited
Everything posted by 0x00
-
Hi, I've been using Opera recently, and every few refreshes I get a download dialog, but tonight I'm getting one on every refresh. The source is from cm.g.doubleclick.net and it tries to open using xdg-open. On a side note, I'm using Opera because it tells me how many elements the page loads, here its anywhere from 78 to 138, now I know from looking at the source that surely isn't what's expected, so I'm guessing it adverts again.
-
Quick glance... Change the following: $office = $_POST["office"]; to if(isset($_POST["office"])){ $office = $_POST["office"]; } The way you currently have it, the variable $office will always be set to something I think...
-
logic question -using two tables to display bookings
0x00 replied to peasepud's topic in Application Design
I generally use unix time, so its seconds since something like new years 1971. Calculate your start and end times for the day(?). Then use those times to check against the start and end times of booked blocks. If a retrieved block extends before or after given period you can easily indicate / link such fact. So... no I personally wouldn't add two entries in this type of situation. If it was based on working days without rollover then I would. -
how to save selected data in mysql using php
0x00 replied to samuel_lopez's topic in PHP Coding Help
You are looping over this variable you have just fetched from the database: $a = $retvalran['sstud_id']; Its only going to be a simple datatype, since its named *id, I'm guessing its an integer... and not an associative array -
@OuisVN, er... are you wanting to store the password without hashing it? That really isn't the way to do it, mainly because its insecure...
-
As you call hash(), the third parameter lets you specify the algorithm.
-
Its the same issue either way... All you need to do is redirect after processing the input (GET or POST)
-
lol, yeah I wrote that before reading, I've never really thought of it as a redirect but can't think of anything else I could have called it previously???
-
I keep seeing this autoloader being banded about and always put off looking it up, till now... I've sort of done my own version, lol... In certain situations I have wrapper functions which return a new class after including its appropriate file. * other common classes I put together in a single file.
-
I don't use redirect, rather I just send them wherever... header("Location: ".my_path_self()); exit(); However, after reading Jacques link I see the beauty of using a redirect instead because of the bookmarks issue. So... function redirect($url, $statusCode=303){ header('Location: ' . $url, true, $statusCode); die(); } (* Not my function) Codes: 301: Permanent redirect 302: Temporary redirect (default used by header function I believe) 302: Other redirect
-
That's brilliant, many thanks, you've saved me a few hours reading up on rewrite syntax When you say behind the document root, you mean outside of the server root, yes? My project is sort of designed for simplicity, as in extract all once (and upload to single location). Basically there are two files (index.php and .htaccess) and three directories. All system files go in one directory structure, all private content goes in another (for easy backup) and then there is a public folder where resources go. (* in reality there are a few things still left in the main directory structure, but they will be moved when enough time.) In reality, all one would need to do is change two defined paths in the config file and the core and private directories could be moved elsewhere...
-
Need help with Server-side Text File editing
0x00 replied to ThatBurritoGuy's topic in PHP Coding Help
http://php.net/manual/en/function.is-writable.php -
Need help with Server-side Text File editing
0x00 replied to ThatBurritoGuy's topic in PHP Coding Help
Have you put that in a file and called it directly? -
Need help with Server-side Text File editing
0x00 replied to ThatBurritoGuy's topic in PHP Coding Help
Its late for me but the code looks ok... Well... \n not /n, and <br /> not <br>... but... Have you tried directly trying to write the file: error_reporting(E_ALL); ini_set('display_errors',E_ALL); $file=fopen($fn, "a+"); fwrite($file, "my test\n"); fclose($file); This way you'll see any errors generated. My first thought would be file permissions... -
So you'd say we're better off just using the existing logs and base the results off them? These features are sort of expected nowadays and I know I like them, they're even on here
-
I like it And keep a tally of actual views in the topics table
-
I'm after rewriting it so that its consistent across the board. You can often tell if a directory exists and being blocked (using Deny) rather than not there. I'm reworking my CMS so that its as stealthy and generic as possible, and ultimately unidentifiable. Thankyou (I've not got back to this yet, but I'm sure I've done this before using rewrite)
-
I have a single log for everything, which includes user_id, link and time (amongst other). So I was working on searching by link with uid and time being used as factors. Its just if there's 30 threads on a page this sounds like a lot of work, esp if the forum was busy... So I wasn't sure if each page had its own log of some sort may be somehow more efficient... Thankyou
-
I use a forum just as an example here, it could be anything. What is the best / general way to log / monitor views of a thread (i.e. when is a new view new? e.g. after a new post, etc) and to display that there is a new post since a specific users last view. BTW, I'm not after any code, just the concept. Yes I can imagine how to basically do it using brute force, but was wondering if there is an efficient way I hadn't thought of? Thanks
-
Good solution but its part of a single package so the mod_rewrite solution is what I'm after, thanks
-
debugging wise I'd echo $_SESSION['username'] to check see whats in there... then, on getting the result I'd check if there was a result
-
If you're not using those columns to search and just retrieving a lot of it to pass back for display / process purposes you could save a php array in a text column using json_encode / json_decode?
-
Hey, The rewrite rules I've been using for the last year or so is RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?q=$1 [B,L,QSA] which sends everything through index.php unless it actually exists. I'm now adding a directory to the root which is private, so any request for the directory or anything in it should be rewritten to go to index.php (which will produce a 404). I'm not after a redirect or having another htaccess file with deny, etc. Some things I've tried #RewriteRule ^(priv/|submit\.php) - [F,L,NC] #RewriteRule ^(priv/)$ - index.php?rxq=$1 [B,L,QSA] #RewriteCond %{REQUEST_URI} !^/priv #RewriteCond %{REQUEST_URI} !^/priv/$ [NC] thanks
-
ok, i should read more, http://dev.mysql.com/doc/refman/5.0/en/select.html
-
thats buzz, cheers... but i dont seem to be finding any good info in the mysql manual on the HAVING bit, not seen that before and would of thought youd of used it at the lowest element, even though i cant see how thatd be... once again cheers...