Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Yes, as I said $maxtime is in seconds. <?php $maxtime = 1000; //or however many seconds you want/need ini_set(max_execution_time,$maxtime);
  2. put this at the top of your script, $maxtime is in seconds... The better solution is to run this via cron job where there is no time limit for executing scripts. <?php ini_set(max_execution_time,$maxtime);
  3. Missing a semi-colon at the end of the previous line.
  4. I suppose you could use the modulus operator to replace the many IF checks. if($loopcount % 100 == 0) $looppage = "index" . $loopcount . ".html"; Or something close to that
  5. CroNiX

    One IP

    wouldn't it be "WHERE ip = '$ips'"?
  6. CroNiX

    One IP

    It will be impossible to implement 1 signup per ip. You are assuming everybody has a static IP and that is not the case. Many IPs change frequently, sometimes even during the same session.
  7. Yes, dont use short tags "<?". They make your code not portable. Always use "<?php". Its just good coding practice. If you have to put your code on a different server and they don't allow short tags, you got a lot of editing to do... But if you use the regular tag it will work anywhere.
  8. Im glad Im not the one who has to count the grains to give away.
  9. Actually, the function already exists for you. Yootheme uses the mootools javascript framework that does all of the browser tests for you. So just use the following: * Browser.Engine.trident - (boolean) True if the current browser is Internet Explorer (any). * Browser.Engine.trident4 - (boolean) True if the current browser is Internet Explorer 6. * Browser.Engine.trident5 - (boolean) True if the current browser is Internet Explorer 7. * Browser.Engine.gecko - (boolean) True if the current browser is Mozilla/Gecko. * Browser.Engine.webkit - (boolean) True if the current browser is Safari/Konqueror. * Browser.Engine.webkit419 - (boolean) True if the current browser is Safari2/WebKit before version 419. * Browser.Engine.webkit420 - (boolean) True if the current browser is Safari3 (WebKit SVN Build)/WebKit after version 419. * Browser.Engine.presto - (boolean) True if the current browser is Opera. * Browser.Engine.presto925 - (boolean) True if the current browser is Opera before or equal version 9.25. * Browser.Engine.presto950 - (boolean) True if the current browser is Opera major or equal version 9.50. * Browser.Engine.name - (string) The name of the engine. * Browser.Plugins.Flash.version - (number) The major version of the flash plugin installed. * Browser.Plugins.Flash.build - (number) The build version of the flash plugin installed.
  10. As kenrbnsn pointed out, you need to use < not <=. The reason is count() will start counting at 1 but arrays start at 0, so it will never be equal to which is why you get the error. It is looking for an index 1 greater than the actual size of the array when you have the =.
  11. Most likely they all need to be the same. Consult your motherboard documentation to be sure or google for it (mb specs)
  12. search php.ini for 'session.gc_maxlifetime'
  13. They have the earlier versions and you can specify by version.
  14. For the javascript framework, if you want to use one, I suggest using google cache. http://code.google.com/apis/ajaxlibs/documentation/ They already have the major frameworks there (jquery, prototype, mootools, dojo) and they are already compressed/gzipped and support versioning. Then they also have plenty of bandwidth to serve. The major advantage of this is once more and more people use google cache, the chances get better that someone already has googles jquery (for example) already in their cache from a different site they visited and so they client browser doesn't have to download it again for your site making it load very fast. If they don't it downloads it using googles bandwidth, not yours. Win-Win!
  15. Well, then you would need a form on the page, or a select list or whatever you are doing.... <form action="processForm.php" method="post"> <input type="text" name="lastname" /> <input type="submit" value="Send" /> </form> Then when they hit submit the form is sent to 'processForm.php'. Within that script, you would: $lname = isset($_POST['lastname']) ? $_POST['lastname'] : ""; now if the form was submitted and lastname had a value you could: if(!empty($lname)){ //do whatever with lname, use it for a db search and return the data for that person to edit } You don't have to send it to a different page, you could submit the form to the same page if you wanted... Hope that helps a bit...
  16. You would need to use ajax since you need to grab more data from the database. You might be able to use an iframe with some sort of javascript refreshing the frame.
  17. Not really. I suppose you could always output the data to a text file or something. You could do as waynewex suggested, thats pretty standard. Why wouldn't you want to store the data in your db until confirmation?
  18. AJAX is for sending/receiving backend requests to the server. What you want to do is use javascript (not ajax) for your form validation. This takes place within the client browser, not the server. It is great for PRECHECKING your values, but not the real validation. If somebody has javascript turned off it will never be validated. So, first check your form with javascript, then when the form is submitted ALWAYS validate again on the server. If you want, you can validate your form with javascript, and if it passes validation then use AJAX to send the form data to a script that will then validate again, and send the response back via AJAX to the browser updating a message that it was saved or whatever.
  19. I am really confused on this topic. I took C++ about 18 years ago (never used it) and it was all about passing by reference. On php.net (http://uk.php.net/references) they state that "References in PHP are a means to access the same variable content by different names. They are not like C pointers; instead, they are symbol table aliases." Ive been programming in php for about 3 years now and have never come across a case where I needed to pass by reference. Maybe I should have, but I really am having a hard time understanding when you NEED or SHOULD pass by reference. Can someone give me some concrete examples when it should be used? What is the advantage, etc.? Thanks
  20. Missing a > on the paragraph tag. echo "<pMeeting Time: $variable16</p>"; should be echo "<p>Meeting Time: $variable16</p>";
  21. The problem is in your very last lines of code. You are trying to execute a javascript function within php. <?php for($i=0;$i<9999;$i++) { // Update textbox with value $i ?> <script language="javascript">UpdateTextBox('<?php echo $i; ?>')</script> <?php } ?> No clue why you're trying to do it like this, but this should make it work....all 9999 times LOL
  22. Its not good to mix <? and <?php. You should always just use <?php so change the others to that. Dont know if thats the problem, but a suggestion.
  23. maybe you can just have the mp3 player grab the xml file using this format: <user>:<password>@<host>:<port>/<url-path> This allows you to access a protected directory via web without typing in the credentials as they are included in the URL.
  24. search for a javascript tooltip script
  25. Basically, you just stated the whole purpose of svn in your questions.
×
×
  • 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.