-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
Search all my posts in one board
Zane replied to The Little Guy's topic in PHPFreaks.com Website Feedback
I guess it can't be done. Try some arbitrary words like the or how or with here help please php get creative -
the equal sign and the greater than sign have to form as one in order to be a .... united operator. So... instead of = > use => Also.. you have to specify each comparison. like $blahblah >= 25.5 AND $dfjsdklf
-
Search all my posts in one board
Zane replied to The Little Guy's topic in PHPFreaks.com Website Feedback
If you click Search at the top you should get those functions. and if you click the options to show the boards... the boards will appear.. you can either check them all, uncheck them all.. check them one by one.. uncheck them one by one.. etcetera.. pretty straight forward [attachment deleted by admin] -
instead of using your custom CleanData function.. try the built-in cleaning function http://php.net/mysql_real_escape_string Then do a normal echo and see how that does
-
Search all my posts in one board
Zane replied to The Little Guy's topic in PHPFreaks.com Website Feedback
Are you that obsessed with your own posts that you don't read the posts that are on the board you post on? [attachment deleted by admin] -
look at http://php.net/nl2br Also, how are you outputting it right now? I assume with just a simple echo, but what's your code.
-
just a quick tip... with booleans like that. you don't necessarily have to compare them to true or false like that. Now if you were doing a strict comparison, that'd be a different story in which you'd use three equals signs ===. But you initial statement in your OP could pretty much be shortened to if($allowed && !$options || ($allowed && $options && $logged)) note the use of the exclamation mark on the first $options.. that's the same as if $options == false. I also used parentheses to combine the second part.. But more realistically, what's your problem? What's so complicated?
-
you either have to set your router to forward your pc's port 80 ... outbound. Or put your pc in the DMZ (probably the easiest solution)
-
try dumpster diving. There's no telling what you'll find. You might even find a pre-built hacker sim in which case you wouldn't even need an extra programmer.
-
How can The IRC chat can be used for php on this forum?
Zane replied to co.ador's topic in PHP Coding Help
the server itself can be accessed through irc.phpfreaks.com You should be able to use any IRC client. If you don't have a client to use, then one if provided at ... well http://irc.phpfreaks.com -
// Define the parameters for the shell command $location = "\\192.168.1.4\folder1\folder_test"; $user = "USERNAME"; $pass = "PASSWORD"; $letter = "Z"; // Map the drive system("net use ".$letter.": \"".$location."\" ".$pass." /user:".$user." /persistent:no>nul 2>&1"); // Open the directory $dir = $letter . ":"; function open_dir ($dir_name) { if ($handle = opendir ($dir_name)) { while (($file = readdir($handle)) != false) { if ($file != '.' && $file != '..') if (filetype($dir_name.'/'.$file)== 'dir') { open_dir ($dir_name.'/'.$file); } else { echo $file." "; echo "-------------"; insert_into_database ($dir_name, $file); } } closedir($handle); } } ?> that's the best I can come up with
-
Why don't you setup another webserver on the desired network and access it that way? It just seems easiest to me that way
-
What's the differences in between an absolute and relative paths?
Zane replied to co.ador's topic in PHP Coding Help
What?.. maybe you're right.. idk. But absolute and relative are exactly as thorpe said in his refined response A relative link .. is relative to its current location. Meaning... when you create a relative link, you are branching FROM that page. In other words.. How many steps does it take to get to your link. If I'm at page A and I want to link to page B which is 5 folders above it; the link would look like this ../../../../../pageB If the link is 5 folders below then it would be something like this f1/f2/f3/f4/f5/pageB In an absolute link.. it doesn't matter how many folders there are above or below pageA, because you're gonna have to put them ALL. For example http://domain.com/f1/f2/f3/f4/f5/pageB Alot of times you'll see links with the slash at the beginning. That is absolute as well. /wwwrootFolder/f1/f2/f3/f4/f5/pageB That's probably about as clear as I can make it EDIT: jeez.. thorpe beat me to it. -
You need to map the network drive instead of accessing it like a ..... network share Here's a good post on it (note that it's in the PHP manual... under opendir) http://us.php.net/manual/en/function.opendir.php#90373
-
Here, I'll break it down for you Lets say for instance... get.php contains this echo "This is get.php and blah blah blah blah blah"; and this is index.php //I want to see what is inside get.php //I guess I will include it include('get.php'); //OMG... it says the same thing as get.php does!!!! //I guess I should echo some other stuff to make index.php more... INDEXy echo "This is the index page and above this... I have included the get.php page"; Can I make it any more clearer
-
What's the differences in between an absolute and relative paths?
Zane replied to co.ador's topic in PHP Coding Help
Think of it like this.... Absolute path of an image... broken down into ....... words - Go to this particular domain name - Go to this folder... and any subfolders - Access the image file Relative path of an image .. broken down - Is the image in the same folder? Yes? No? - If not... is it in a folder (or subfolder) within the current folder? Yes? No? - If not... is the image somewhere above the current folder... In short.. an absolute path is setup so that you can use images/links/media/whatever ANYWHERE A relative path is setup such a way so that you tell it exactly where it is on the current server. Is it here, is there, is it above below... To make things easier... relative paths don't have domain names in them. -
umm.. are you echoing the fetched data on get.php..? That would have a lot to do with it
-
http://php.net/include
-
You're easiest route... safest.. less work.. etcetera. Would be to download Wampserver (assuming you're on windows) http://wampserver.com/en It's all up to date. All you have to do is save the files you want to save.. and put them in the www folder when it's all said and done. Because yes, I would recommend upgrading Apache and MySQL too and WAMPserver is a complete package with all the latest packages. Then, you can start your Wampserver and if you start to get errors... just fix them one at a time. Most likely though since it's just PHP 5.2.x you won't get that many if at all. I can't say the same for MySQL though.
-
by using the square brackets you are distinctly telling PHP that $surname is going to be an array without having to set it beforehand. It's much easier that way. Otherwise you'd have to do it this way. $i = 0; $surname = array(); // Even if you didn't put this it would still work. while($row = mysql_fetch_array($result)) { $surname[$i] = $row['last_name']; $i++; }
-
Sorry, I'm still not quite understanding you. But I think your looking for the GROUP BY function and the ORDER BY function keep in mind you can GROUP and ORDER by multiple columns.
-
That is where you would use PHP.. ... hmm.. lets see assuming you know the basics of PHP/mysql fetching.. Since you'd be using a loop to do all this it'd be quite easy to do.. Just make an array of all these names.. and only use the first and last ones... on each page so in your while loop.. the mysql_fetch_array one.. it would be something like while($row = mysql_fetch_array($result)) { $surname[] = $row['last_name']; } $toFromHeader = "From {$surname[0]} to {$surname[23]}"; echo $toFromHeader;
-
It must be a bit difficult, because am lost on your explanation. You want importance and quantity to be added together ONLY if the next user's code and color values are equal? Now why would you have a problem with this?
-
I see. My guess is that you're doing pagination, correct? Pulling 24 records at a time for each page, etc, etc. If you check out the documentation, the SQL documentation you'll find out that doing such a thing is as simple as adding a comma to your LIMIT part of the query. Let me explain This will pull the first 24 records SELECT * FROM tblclientinformation LIMIT 24 This will pull records 25 through 49 SELECT * FROM tblclientinformation LIMIT 25, 49 This will pull records 50 through 97 SELECT * FROM tblclientinformation LIMIT 50, 97 and so on and so on
-
If you only want the low row then you should use this query.. Assuming you have an id column Select * from tblclientinformation ORDER BY id DESC LIMIT 1 If you only want the last name in the last row then you should use something like this Select last_name from tblclientinformation ORDER BY id DESC LIMIT 1