Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. i have this so far RewriteEngine On RewriteBase / RewriteRule ^Login login.php [NC,L] RewriteRule ^Login/ login.php [NC,L] RewriteRule ^About about.php [NC,L] RewriteRule ^About/ about.php [NC,L] RewriteRule ^Products products.php [NC,L] RewriteRule ^Products/ products.php [NC,L] RewriteRule ^Services services.php [NC,L] RewriteRule ^Services/ services.php [NC,L] RewriteRule ^Portfolio portfolio.php [NC,L] RewriteRule ^Portfolio/ portfolio.php [NC,L] RewriteRule ^Contact contact.php [NC,L] RewriteRule ^Contact/ contact.php [NC,L] RewriteRule ^Reminder reminder.php [NC,L] RewriteRule ^Reminder/ reminder.php [NC,L] RewriteRule ^Privacy privacy.php [NC,L] RewriteRule ^Privacy/ privacy.php [NC,L] RewriteRule ^Terms terms.php [NC,L] RewriteRule ^Terms/ terms.php [NC,L] RewriteRule ^Terms terms.php [NC,L] RewriteRule ^Terms/ terms.php [NC,L] Just need the dynamic one now
  2. How can i rewrite urls like this to Also how can i use a URL like or Is this correct: RewriteEngine On RewriteBase / RewriteRule ^Login login.php[NC,L]
  3. how do i do something like $var == 1 : true ? false ?? thanks
  4. that code doesn't make sense to me, you are sending each var on it's own instead of sending them all together. Take a look at http://www.codeguru.com/forum/showthread.php?t=421822
  5. Can some people check over my site as i have just had a few hacking attempts on the site http://djw-webdesign.awardspace.com/ The attempt was at remote file inclusion From my hit/404 logger
  6. What is the problem?
  7. Use sessions, here is a tutorial to help http://djw-webdesign.awardspace.com/code.php?snippet=9
  8. If you want some serious testing go to http://www.hellboundhackers.org/ and get one of them to test it
  9. No! I meant do you have a question or are you just randomly posting code. This is a help section on the forum, and normally is used to help people with there coding problems. Not just to show off code.
  10. thanks i tried $tags = preg_replace("/" . $search . "/", "<b style=\"color:#0000FF;\">\\1</b>",$tags); but no luck, and a few other variations
  11. Try reading through some of these http://djw-webdesign.awardspace.com/snippet.php?cat=1&currentpage=1 And try http://www.tizag.com/phpT/forms.php
  12. That code i just posted was removing duplicate tags, i still haven't got $tags = preg_replace("/" . $search . "/", "<b style=\"color:#0000FF;\">$1</b>",$tags); working And here is the page using it http://djw-webdesign.awardspace.com/search.php
  13. Question?
  14. Might sound random, but why?? Why are you forcing yourself to wait? Doesn't make any sense.
  15. Not bad, but not good! It would be better to use javascript or AJAX to show a real time loading
  16. Nope, not without the page reloading, or using AJAX or it will just show 1 2 3 4 5 6 7 8 9 10 all at once.
  17. Haha <?php $tags = make_safe($_POST['tags']); $tags = explode(",",$tags); $tags = array_unique($tags); $tags = implode(",",$tags); echo $tags; ?>
  18. Javascript
  19. Also how can i remove duplicate words from an array. i have tried <?php $tags = make_safe($_POST['tags']); $tag = explode(",",$tags); foreach($tag as $t) { if(substr_count(strtolower($tags),strtolower($t)) > 1) { $dup[] = $t; } } foreach($dup as $dupilcate) { if(substr_count(strtolower($tags),strtolower($dupilcate)) > 1) { //echo $t."<Br>"; $pos = stripos($tags,$dupilcate); $len = strlen($dupilcate); $ta = substr_replace($tags,"",$pos,$len); } } print_r($ta); ?>
  20. Using $tags = preg_replace("/" . $search . "/", "<b style=\"color:#0000FF;\">$1</b>",$tags); This doesn't do anything, it just shows the tag normally
  21. for custom error <?php $db = mysql_select_db(db_name,$conn); if(!$db) { echo "Customer error message"; //or if you want to redirect $error = "db error"; header("Location:error.php?error=".$error); } ?> then on error.php <?php if(isset($_GET['error'])) { echo $_GET['error']; } ?>
  22. At the moment i am using this code to replace any words with highlighted ones that are searched for, but at the moment this will change the words to the one that was searched (normally in lower case). How can i have it keep the original word. e.g <?php $tags = $rows['tags']; $tags = str_replace(","," ",$tags); $tags = str_ireplace($search,"<b style=\"color:#0000FF;\">".$search."</b>",$tags); $title = ucfirst($rows['title']); $title = str_ireplace($search,"<b style=\"color:#0000FF;\">".$search."</b>",$title); ?> This doesn't make much sense, but hopefully you understand
  23. Used ini_set();, warning remember to put it before session_start();
  24. Could i use ini_set();?? e.g. <?php ini_set("session.use_only_cookies",1); ini_set("session.use_trans_sid",0); ?>
×
×
  • 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.