-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
release is a reserved word in MySQL surround every one of your table name in that SQL query with backticks `release`,`filesize`,`players`,`timeofday`,`textures`,`weapons`,`authorlink`....etc etc
-
where's the code for toggle_visibility()?
-
you have to escape them with a backslash \[Category\sName\] would match [Category Name]
-
I'd like to see a tutorial on using formatted strings and their functions' differences Such as: # printf() # sscanf() # fscanf() # vsprintf() But mostly how to correctly use the type specifiers.
-
once WAMP is setup it is ready for the web If you have broadband, then you have ISP/hosting (now if they allow you to host a server is another story) then you need to access your router control panel and configure port forwarding for port 80 to go to your computer
-
Pretty much if you want it dynamic...it all depends on how your form works and being able to create the above code dynamically that's all there is to it. if you have a POST form then $van_pool_members['member_3']['first_name'] = $_POST['fname'] $van_pool_members['member_3']['last_name'] = $_POST['fname'] $van_pool_members['member_3']['member_number'] = count($van_pool_members);
-
wow I just figured out what you were doing now....no wonder I was confused This is a CSS issue not PHP You gonna have to edit the CSS for select b, option b select select b, option b { font-weight: bold; }
-
there's no way that doesn't make it bold unless you have a stylesheet somewhere that is changing your tags
-
Yeah, sorry, but that's just ridiculous. I'm sure a photoshop forum would have something like that
-
maybe I'm just going out on a limb here but did you try Day:
-
sorting list of directories by count of contents
Zane replied to hellonoko's topic in PHP Coding Help
Added some comments $dir = "/home2/sharingi/public_html/subdomains"; //This is a Linux command to get your directories /* --max-depth controls the amount of directories it goes deep -k means the size is returned in kilobytes if you want megabytes instead do -m or -b for just bytes */ $out = shell_exec("du " . $dir . " -m --max-depth=1"); //This split everyone one of them each into separate lines to work with..since they're returned as a whole foreach(preg_split("#\n#", $out) as $val) $thedirs[] = preg_split('#\s#', $val); //The separates the size from the dirname and puts the array //This is a function to sort the dir's size in ascending order.... function sortSize( $a, $b ){ if ( $a[0] == $b[0] ) return 0; if ( $a[0] return -1; return 1; } usort($thedirs, "sortSize"); foreach ($thedirs as $val) echo $val[1] . " (" . $val[0] . ") \n"; ?> -
sorting list of directories by count of contents
Zane replied to hellonoko's topic in PHP Coding Help
$dir = "/home2/sharingi/public_html/subdomains"; $out = shell_exec("du " . $dir . " -k --max-depth=2"); foreach(preg_split("#\n#", $out) as $val) $thedirs[] = preg_split('#\s#', $val); function sortSize( $a, $b ){ if ( $a[0] == $b[0] ) return 0; if ( $a[0] return -1; return 1; } usort($thedirs, "sortSize"); foreach ($thedirs as $val) echo $val[1] . " (" . $val[0] . ") \n"; ?> -
are you not able to understand conditions in the if statement or an if statement I assume you mean the USE_USERNAME.. this is a constant look at http://php.net/define
-
The above function will capitalize every word in a sentence or string This one will only do one ucfirst()
-
Well here you are clearly missing an argument $script_protector = new security(); // accessing the class have you tried putting one and see if you get the same error
-
You were right indeed I managed to find it and fix it...wooh! Now just gotta make another mod
-
wait...which mod you talkin about I was just talkin about the background thing...true I didn't code the Topic Solved Mod
-
No, actually I made it so that if the icon that is being used happens to be a check mark (topic_solved)...THEN it's solved. The SOLVED thing can be changed to anything...just change it in Configurations > Mods > Topic Solved > Prefix or actually just change the solved method to just a check mark. but still the prefix still looks pretty aesthetically pleasing. The only thing that sucks about this new background mod...is for some reason it won't work on the recent replies... if you click View replies since last logged in and such.....the solved buttons are the same old none background one
-
[SOLVED] Glich in the board software.
Zane replied to p3aul's topic in PHPFreaks.com Website Feedback
Not sure why it was restricted This is the only file we have for you though We'll look into the it. -
The real difference between a robot and a human or any living thing....is food. Robots don't eat. Although they do need energy, but they don't crave it. When people can program or design for a better word....a robot to harness energy from the food we eat or anything else....well actually even if they still continued to use the energy they do now...batteries, fuel, solar panels, etc. If you can program a robot to actually ... crave these things and use intelligence to survive and nourish itself... Then and only then would I believe that you have true AI. Makes me think of the movie WALL-E That was a great movie. Otherwise you just have Extremely Interactive Computers as technology gets better and better.
-
cool, well glad you got it working
-
you never did really tell us the problem..... you pretty much just said....IF statement don't work (*in a hillbilly accent* to make a point) what doesn't work about it...are you getting errors...are the values empty, is the page blank, is the ECHO not echoing.... I'd assume the echo is working but...well....Maq as pretty much solved that idea
-
uh.....as far as I'm concerned. that looks fine to me....also it looks like a snippet of something what else is there, there is probably an error somewhere else
-
lol..a US thing eh? I feel like a victim to condescension or something....probably not though...might just be a UK/European/Australian thing..lol Must be great not to have to hear about this stuff every where you go. (The Presidential Debates and what not)