Jump to content

ratcateme

Members
  • Posts

    1,216
  • Joined

  • Last visited

    Never

Everything posted by ratcateme

  1. $arr = array('Jan' => 'January', 'Feb' => 'February'); //you need to complete this foreach ($arr as $code => $full) { echo "<Option VALUE=$code>$full</option>"; } Scott.
  2. something i have always wondered about glob can you use it to match files with different extensions. so like with one glob could you get files that are .jpg, .jpeg, .gif, .png or would that require 4 glob's joined? Scott.
  3. if you have each URL on a new line you could use $urls = file("images.txt"); file() opens a file and creates a array each array element is a new line Scott.
  4. well you can use file_get_contents / file_put_contents or fopen but php will not do this simultaneously you have to download each image one at a time you can thread php but only in a CLI environment not when it is being used as a web server. Scott.
  5. i use that for images uploaded but this is for images all ready on the local file system wouldn't it be safe to assume they are all proper images? Scott.
  6. you can but most internet IP's are now home to many users and are dynamic so that if they disconnect there router they get a new one on reconnect so they are no longer blocked also then when someone else on the same ISP connects they could get the blocked IP when they did nothing. really all you can use is email addresses and cookies but unfortunately they can both be defeated. but really if you use a CAPTCHA then they can't use automated scripts and will likely give up after being banned Scott.
  7. sorry got it a little wrong try if(in_array(substr($file,strpos($file,".")+1),$image_types)){ needed to replace $text with $file Scott.
  8. try a if like this //add this line to the top $image_types = array("jpg","jpeg","gif","png"); //add this inside your while if(in_array(substr($text,strpos($text,".")+1),$image_types)){ //display image } also the loop should work like while (false !== ($file = readdir($handle))) { Scott.
  9. you are most likely missing a HTML header check example 4 on mail look at the headers near the bottom Scott.
  10. to get it to add one just change the -1 to a +1 the query looks fine to me. if you say it works and some times it doesn't. can you tell us how it doesn't work? Scott.
  11. try changing the links in your css to layout/images/banner.png and layout/images/block.png Scott.
  12. where are the images located? could you find banner.png at http://yoursite.com/banner.png ? that is where the browser is looking Scott.
  13. echo "time taken: " . round($res/(24*60*60)); should do it Scott.
  14. <?php $files = array (); if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) { if(substr($file,strlen($file)-3) == "php"){ $files[] = $file; } } closedir($handle); } print_r($files); ?> adapted from readdir that should do it check the manual for more info Scott.
  15. you are missing the closing " on your meta tag Scott.
  16. you cannot delete through http think about it if that were possible someone could go to say send a http delete to http://www.google.com and we would lose Google you need to use file system paths they can be complete like c:/xampp/htdocs/xml_files/enq_paathshala.xml or relative like xml_files/enq_paathshala.xml if you were running a script in c:/xampp/htdocs/ but they must be file system paths also i would strongly advise using full paths so you don't delete anything you want Scott.
  17. sorry i misspelled submit try changing it to Submit1 instead of Sumbit1 Scott.
  18. to find a post check your post history http://www.phpfreaks.com/forums/index.php?action=profile;area=showposts;sa=topics;u=65070 to fix your problem you want a if like this if(isset($_POST['Sumbit1'])){ around your insert code Scott.
  19. can you show us all the code upto line 25 and the code in vid/dbconfig.php really the only problem is that you have the variable names wrong Scott.
  20. a quick test on my server i had no problems im not sure what is happening. that if should handle it try putting var_dump(is_dir("../secure/admin/clients/$username")); var_dump(is_file("../secure/admin/clients/$username")); to see what is going wrong i can't see any problems Scott.
  21. if(is_dir("../secure/admin/clients/$username") || is_file("../secure/admin/clients/$username")){ //dir already made } try that Scott.
  22. i am guessing that on line 5 of apps_view.php there is some kind of output? then on some line after that there is either include "appView/level4_check.php"; or require "appView/level4_check.php"; you need to change it so that session_start() is called before the output Scott.
  23. here is the real output from http://69.59.125.225/stripe/new.php <br /> <b>Notice</b>: Undefined variable: text_length in <b>/var/www/html/stripe/new.php</b> on line <b>48</b><br /> <br /> <b>Notice</b>: Undefined variable: xtra_height in <b>/var/www/html/stripe/new.php</b> on line <b>64</b><br /> <br /> <b>Notice</b>: Undefined variable: value in <b>/var/www/html/stripe/new.php</b> on line <b>112</b><br /> <br /> <b>Notice</b>: Undefined variable: value_counter in <b>/var/www/html/stripe/new.php</b> on line <b>114</b><br /> <br /> <b>Notice</b>: Undefined variable: value_counter in <b>/var/www/html/stripe/new.php</b> on line <b>114</b><br /> <br /> <b>Notice</b>: Undefined variable: value_counter in <b>/var/www/html/stripe/new.php</b> on line <b>116</b><br /> dont know how much of a impact they have on it but i am assuming they are your problem Scott.
  24. also the one of table names has to come from the first query don't know if that is possible i didn't find any examples when i googled it Scott.
  25. thanks corbin ill start to go without them ok let me explain a bit further i am trying to remove a row from types.table and leaves at the moment i have it done with 3 queries the first one to get types.table the second to delete from types.table and the third to delete from leaves $row = get_row("SELECT leaves.branchID AS branchID, types.table AS table, leaves.typeID AS typeID FROM types, leaves WHERE leaves.ID = $id AND leaves.type = types.ID LIMIT 1"); query("DELETE FROM {$row['table']} WHERE ID = {$row['typeID']} LIMIT 1"); query("DELETE FROM leaves WHERE ID = $id LIMIT 1"); (get_row() is a function that handles errors and returns mysql_fetch_assoc(). query() handles errors and returns the result object) is there a way i could join all there queries to make one? Scott.
×
×
  • 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.