Jump to content

bspace

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by bspace

  1. sure you want to remove the drop table? to remove the comments /* remove comments */ $string = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $string);
  2. well if you need your main file to be .html then your gonna have to set up an .htaccess file containing AddHandler x-httpd-php5 .php .html
  3. well you could look at a java solution e.g. JUpload
  4. the "code" for a pound sign is £ note the semicolon, your feed is not terminating the character reference correctly the 'funny symbol' represents &#163399, i assume the last bit '399' is the missing part of the price if you can't correct it at source, maybe you can do a search and replace
  5. rewards based on storing info in cookies? i think you need to rethink this and do it with php and your database
  6. Headers MUST be sent before any output is started.
  7. forget the $imagei stuff put the refs in an array eg $pageImages = array("images/image1.jpg", "images/image2.jpg", "images/image3.jpg"); loop through the array
  8. if the link is opening the image in a new window that usually means the javascript isn't working are you sure the js is loading? you might have better luck asking in the javascript subforum
  9. first you can get the variable 'q' containing the coordinates using $coords = $_GET["q"]; then split them at the ',' with explode for further info google; $_GET explode() arrays
  10. as far as i can see it's doing what it's supposed to pointing to page.pl.php you still have'nt said what you actually want it to do that's different to this why would you want it to be different? looks workable to me
  11. i seem to remember that safari has/had a problem with 'innerHTML' setting it (the 'innerHTML') to an empty string before giving it a new value may be a solution
  12. well i for one wouldn't bother reinventing the wheel have a look at http://www.uploadify.com/ and http://www.verot.net/php_class_upload.htm uploadify is jquery it needs a 'script' to do the actual uploading, i use a file i call upload.php this uses the php_class_upload class to do the work, at the end of this, if the upload succeeds i put the mysql update bit so, i use the jquery / uploadify bit on my main entry page this calls upload.php to do the lifting if the upload succeeds the database is updated with the file name uploadify can then, via a javascript callback, refresh part of your page with the newly uploaded image this lot takes a little understanding of using jquery/javascript and php together but you end up with a nice reactive file upload oh, and i'd use two tables as you suggest if in the future your going to need two or more images for the info, your good to go
  13. $filename = "/path-to-file/log.txt"; $handle = fopen($filename, "r"); $logfile_text = fread($handle, filesize($filename)); fclose($handle); $pos = strpos($logfile_text, '>', 1); $rtrv-ls = substr($logfile_text, 9, ($pos - 9)); a base to start from
  14. there's a benchmark page at http://www.phpbench.com/ which suggests that foreach is quicker (scroll down to find) although whether it's actually noticable in practice would probably come down to how complicated the code in the loop was in this case i'd go for ease of reading the code over marginal speed gain there's a number of other rather interesting comparisons here too
  15. assume $profile is an array $profile = array_map("intval", $profile); if ((min($profile) >= 0) && (max($profile) <= 1)) {.......} might be one way
  16. if i understand what you want to do then instead of header('Location:script/Script.jar'); you need to look at readfile and protect the folder with htaccess, to prevent direct navigation
  17. or for a full php script look at timthumb resize on the fly with local cache etc etc
  18. not to solve the main problem, but you shouldn't be using id="bold" in that loop, but class="bold" and amend the css to reflect this ID names should be unique to 1 html element
  19. you'd be better putting the sidebar and content in separate divs, like this <div class="content"> <p>the quick brown fox jumps over the lazy dog.</p> </div> <div class="sidebar"> <p>stuff in the sidebar.</p> </div> then your css goes like this .sidebar { float:left; left:0px; position:relative; width:200px; } .content { float:right; position:relative; right:0; width:590px; } don't go adding padding / margin to these unless you can deal with possible box model problems as regards the way you've got the code right now, it's behaving just like it should if you wanted to go with it like that you'd have to float you're sidebar left then either give the <p> in the content a 200px left margin or float it right with a 590px width
  20. a quick google of "Online Font Converter" gets you from .pfb to .ttf etc then google "@font-face" useful link http://www.fontsquirrel.com/fontface/generator
  21. $query = "select * from client_information where concat(name_last,name_first,etc) like \"%$searchfor%\""; check out "concat" and "concat_ws"
  22. infact going straight to http://www.secretauctions.com/atv_list.php works without going through the login ie - logged in using firefox, copied and pasted above url into chrome - no errors, no login required
  23. well it looks like a problem with 'photo' somewhere show us the form code
  24. but i wasn't sugesting comparing '10.44.6.' with '10.44.6.1' I was suggesting that if you take $ip, remove anything after the last '.' you will then effectively be comparing '10.44.6.' with '10.44.6' no matter what the last part of the address is '10.44.6.' does equal '10.44.6.' there are obviously othe similar approaches, the point was that the check could be made without involving wildcards or netmasks etc
×
×
  • 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.