Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. That's a fine idea you have there vividona, but noone's gonna be able to help you out very much unless you show us what you've already attempted. No one is going to code it for you.
  2. This should do the trick. for($dc = 1; $dc $theIndex = "item_number" . $dc; echo ${$theIndex} = $_POST[$theIndex]; }
  3. something like onClick(document.getElementbyId("yourDIV").style.height = document.getElementbyId("yourDIV").style.height + 1);
  4. instead of setting a counter.. use mysql_fetch_array to keep a count. something like $row = mysql_fetch_array($myResult, MYSQL_NUM) NOTE the "MYSQL_NUM" .... this tells mysql_fetch_array to only use numbers and not field names... this way you can loop through your results... like this foreach(($row = mysql_fetch_array($result, MYSQL_NUM)) as $fieldNum=>$value) { echo $fieldNum++ . " -> " . $value; } and you're... current number will ALWAYS be the $fieldNum PLUS 1...
  5. my guess is that you haven't selected your database... look at mssql_select_db()
  6. what do your paths look like... the "relative" ones..
  7. Snake.... it's a snAKE
  8. Well, I guess by Flash I really meant Actionscript 2/3.
  9. Zane

    Ruby

    I've still yet to find a reason to learn it. Though I've heard nothing but good things about it. I can't tell you exactly what it does but I'm sure it's just another server-side programming language with a different syntax. I wouldn't so much be worried about learning the "rails" part as I would be about learning the Zend Framework. That's where it's at nowadays. I'm sure if you can pick that up then Ruby/Rails would be a piece of cake. Honestly, I'd like to just hear what exactly Ruby/Rails/Zend do that's different from PHP.. not to try and thread jack. If they all do the same thing as PHP, then what's the point in learning it/them? Sure they're more simplified in their syntax, more structured and well.... you can actually get certified in it, but there has to be a significant reason to use it?
  10. If you put Java and Flash side by side in their history, that in and of itself should answer your question. Simple put, Java has been around much much longer than Flash has. I believe Flash games became popular around the same time that newgrounds.com came about; if I had to guess. That being said, you can just imagine all of the libraries and such that have been developed over the lifespan of Java. Not to mention the 3D modeling engines that may run side by side in creation of a game. If you take a look at a 3D Flash game you'll notice that Flex or Swift3D was involved in the 3D process...(programs designed specifically for Flash) not Maya, not Lightwave, not Cinema4D.. It's just about the same concept as Javascript. Although you can't make a 3D game with it (even if you could it would be highly difficult), it has been around so many years that libraries upon libraries have been developed for it. Some winners, mostly losers. jQuery comes to mind.. as it's pretty much my favorite Javascript library. It would take hundreds upon hundreds of lines of Javascript to do the things you can do with jQuery. That's just a quick analogy of why Java is so.... brute. It may be a little difficult (though more refreshingly easier than Perl) but thanks to all the libraries that exist, one can create nearly anything they want in Java... on any platform. To come to think of it.. if you're wanting to create a program, a web based program.. you pretty much have 3 choices. - Flash (Which works on all platforms now) - Silverlight (Which has overrun Flash's popularity lately and only works on Microsoft) - Java (The daddy of em all).... Of course you could always create a PHP web-based app, but you'd need something client side like Javascript/AJAX to really make it "pop." And you could also make a C++ program, but it's INPUT would have to be something generated from a webpage.. bringing you back to PHP/ASP. So why do people make Java games instead? Because, like has been mentioned before, EVEYRONE has Java.. and if they don't it's because they either don't have internet or are too lazy to install their updates. Maybe there is a 3D Java library, maybe there isn't, but you can essentially use anything to create your model and put it in Java. Once it's in Java... that's it. Of course... I may be completely and utterly wrong.. I don't even make games (especially 3D ones). So take my answer with a grain of a salt.
  11. it may be malformed HTML.. like I said.. I didn't test it. try opening and closing a table tag.. directly before and after the for loop.. respectively. echo "</pre> <table>"; for($i = 0; $testdata = mysql_fetch_assoc($testresult); $i++) { if($testdata['m'] == "January") echo ($i>0) ? "$monthsTR\n" : "$monthsTR\n"; echo "$testdata['total']"; } echo "</ta As for the testdata == January part.. idk. I tried to make it obvious that you need to check to see if it's January ... to start a new listing. You'll have to tweak it to work from what you have..
  12. put this in server.php to see what's coming through. echo "", print_r($_POST), ""; Note:.. you must use your AJAX callback function updatePage to view this data. Simply going to server.php will do nothing.
  13. If you put a slash at the very beginning.. you can make an "absolute" path.. (not exactly absolute) for instance.. if you're link path points to "/htdocs/file1.php"... then that link will work ANYWHERE on that server, because it's explicitly put. on the other hand.. if you don't push a slash in the beginning. It will look for a folder named htdocs in the current directory the file is in. I'm not sure if this method will work on Windows or not though.. haven't tried.
  14. $monthsTR .= "Jan\n"; $monthsTR .= "Feb\n"; $monthsTR .= "Mar\n"; $monthsTR .= "Apr\n"; $monthsTR .= "May\n"; $monthsTR .= "Jun\n"; $monthsTR .= "Jul\n"; $monthsTR .= "Aug\n"; $monthsTR .= "Sep\n"; $monthsTR .= "Oct\n"; $monthsTR .= "Nov\n"; $monthsTR .= "Dec\n"; $testsql = "SELECT SUM(bedrag) as total, EXTRACT(YEAR FROM date) as y, EXTRACT(MONTH FROM date) as m FROM provisie WHERE werknemer_id = $validid AND YEAR(date) BETWEEN '$start' AND '$end' GROUP BY y,m"; $result = mysql_query($testsql); for($i = 0; $testdata = mysql_fetch_assoc($result); $i++) { if($testdata['m'] == "January") echo ($i>0) ? "$monthsTR\n" : "$monthsTR\n"; echo "$testdata['total']"; } something like that... NOT TESTED
  15. you can either make a loop, querying the database for every year to get new results.. Or you can figure out a complicated query to give you every single value you need. This is usually the best way... but after getting this data you would need to loop through every result.. check if it's January and if it is.. start a new variable/array/"tr" tag containing this "new" data.
  16. session_cache_expire() call that with an argument of how many minutes you want.. BEFORE session_start(); I.E... if you want them to have an hour of login.. then go session_cache_expire(60);
  17. basename() http://us2.php.net/basename returns the filename... and like roopurt mentioned.. if $_FILES['file']['name'] contained a bunch of slashes... using basename would take those out and only return the filename..
  18. I ended up created a "joining table", as suggested by cags in the IRC Chat. So in the end I would have ... a table for: Clients Groups Members // The Joining Table.. consisting of a memberID, clientID, & groupID
  19. Lets say I have a column (called group) in a table called clients.. and I have a table for these groups. In the aforementioned column I have a comma separated list of indexes, relative to the table group. How can I select ALL clients from a certain group? Say for instance I want all clients with a group ID of at least 5. Is there a function to run through a comma separated list..? Something similar to the way IN works. So then I could be like SELECT * FROM clients WHERE group IN (5) Obviously the code above won't work (or will it).... what should I do?
  20. it may be as RusselReal already put it. You only have read privileges. If you have access to the Server itself that FTP is hosted on, then you should change the permissions on the files to 0755 for the ftp username you're ..... using.
  21. Wow where'd you find that case. I like the fact that the PSU is on the bottom. Overall, it all looks like some sort of demonry.... DDR3?! 1200W?!, well I never.
  22. acronyms are good only for a community that uses them. POW? SJS?.. You can't just put an acroynm out there and expect people to know what is it.. For example: My first vision when I see POW is .. Prisoner of War. ..and for SJS,...mmm.. idk I'd just assume it was some sort of CMS (acronym drop, Content Management System; I can't be hypocritical). Super Javascript Server?.. i don't know, I haven't googled it yet. As for your code? are you getting errors; is it "not working";... What's the problem?
  23. http://php.net/manual/en/function.mail.php Check out Example #4
  24. What did you change the path to, would be pretty useful to know? When you FTP something you have to give the explicit.. absolute path to where it's going.. not just "install.htm" There could be 300 install.htm's on that FTP server. an example path would be $ftp_path = "/public_html/MyAwesomeInstaller";
  25. If bold underlined is what you want.. then a bold underlined custom font you'll need to make.. (at least that's the easiest way I can think of doing it) I'm not too sure how TTF works with GD Library but I do know that you can create a GDF font from a TTF font, using this program http://www.wedwick.com/wftopf.exe. You can load up Arial Black... set your desired size, styles, etc.. and save it; upload it to your server and use it. By use it I mean, use this function imageloadfont .... and too
×
×
  • 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.