Jump to content

bspace

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by bspace

  1. in this case you could remove everything after the last . in $ip giving 10.44.6. then this would work if ($ip == '10.44.6.')
  2. do you mean you want to have some code in content.php which displays an image only when the containing page is /index.php look up $_SERVER['PHP_SELF']
  3. you'd be better asking in the appropriate sub form "css" in this case
  4. actually looking at it again there's no need for the array bit, and i completely b'd that up anyway cause explode isn't what's needed double sorry $features is a comma seperated list anyway, like (1,5,9) $sql = "SELECT * FROM features WHERE f_id IN $features"; should work
  5. that was the point of turning the array into a comma separate list of numbers as in $feature2 = explode(",",$feature2); it got lost out of the "code" box, but it's there in my post so you get $feature2 = explode(",",$feature2); $sql = "SELECT * FROM features WHERE f_id IN $feature2"; which is using a comma separate list of numbers, as is needed, not an array sorry i messed the code box up, hopefully it's clear now
  6. use IN something like: $feature2 = explode(",",$feature2) $sql = "SELECT * FROM features WHERE f_id IN $feature2";
  7. F_name or f_name ? watch your case what's the connection between your first bunch of code and the last please explain what you want as it's not clear from your post
  8. try something like WHERE MATCH(sport,first_name,last_name,MVP,team) AGAINST('$query' IN BOOLEAN MODE AND concat(sport,first_name,last_name,MVP,team) like %$query$ point being that although the LIKE is much slower than MATCH it's only applied to the lines that MATCH finds, not the whole set course you may need to do some converting to lower case, like AND lower(concat(sport,first_name,last_name,MVP,team)) like %lower($query)$
  9. accounting for final OR $WHERE_STATEMENT = array(); array_push($WHERE_STATEMENT, "city LIKE '%$city%'"); array_push($WHERE_STATEMENT, "name LIKE '%$name%'"); etc..... $WHERE_STATEMENT = implode(" OR ", $WHERE_STATEMENT);
  10. construct the WHERE statement first $WHERE_STATEMENT = ""; if($city != "") { $WHERE_STATEMENT .= "city LIKE '%$city%' OR"; } if($name != "") { $WHERE_STATEMENT .= " name LIKE '%$name%' OR"; } etc....... then run the query $query = "SELECT * FROM database WHERE $WHERE_STATEMENT";
  11. just to add belt and braces i'd still check if a file named $animation_fileX already existed in the database the object is to give files a unique name, sods law dictates that eventually there will be an existing file and it will happen when demo-ing to a client to do this look at using a call back function whilst generating $animation_fileX - so: generate $animation_fileX check if exists in DB if not return $animation_fileX else call function again
  12. don't put a para after the "protected:" enclose the "protected:" in the para echo '<p id="Protected_Required">Protected: ' . $row["Protected_Required"] . '</p>';
  13. or better still <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> and be up to date, it's html5
  14. you probably need to echo the http:// bit try echo '<p id="images"> <a href="images.php?id='.$row['id'].'">Images</a></td> | <a href="http://' . $row["links"] . '">Link</a> </td>'; also in this html, you have a paragraph id="images" as this is in a loop then presumably you may get more than one id of the same name id should be unique, use class="images"
  15. check the field names earlier you gave some code with a field "Closed" is this the field you want to update?
  16. depends how much functionality you need, but have a look at http://www.tinymce.com/ (no file uploads) and http://ckeditor.com/ which also has a file uploader manager http://ckfinder.com/
  17. perhaps you mean "passing" not "parsing"
  18. do you mean you want to use a WYSIWYG Editor on a form field? if so have a look at ckeditor or tinymce
  19. look at strip_tags in the manual assuming you want a php fix
  20. HTTP POST from PHP, without cURL http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/
  21. re breadcrumbs take a look at http://www.whitford.id.au/webmonkey/code/breadcrumbs/
  22. that's the Unicode block Replacement character http://en.wikipedia.org/wiki/Specials_%28Unicode_block%29#Replacement_character you've possibly got a mismatch in your character encoding somewhere
  23. one of the many online tutorials to do something like you want http://dustinbrewer.com/creating-a-photo-gallery-in-css-without-tables/ assuming you can get your data into a list (a simple loop will do this) like in this example just use css to format it principal is to "display;inline:" and make a bounding div just wider than the width of eg 3 images
  24. mysql_real_escape_string() needs a connection to operate mostly it'll just use the last open connection and therefore things will look ok but if you haven't opened a connection then it won't operate if this is the problem - try this instead $search=array("\\","\0","\n","\r","\x1a","'",'"'); $replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); $id = str_replace($search,$replace,$_GET['id']);
  25. you need to look at using a htaccess file see for example: http://corz.org/serv/tricks/htaccess.php Options -Indexes will do the trick
×
×
  • 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.