-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
Mod Rewrite dynamic URLS and Static rewrites
DeanWhitehouse replied to DeanWhitehouse's topic in Apache HTTP Server
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 -
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]
-
Thanks
-
how do i do something like $var == 1 : true ? false ?? thanks
-
Problem Passing AJAX Parameters to PHP
DeanWhitehouse replied to millercj's topic in Javascript Help
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 -
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
-
Problem Passing AJAX Parameters to PHP
DeanWhitehouse replied to millercj's topic in Javascript Help
What is the problem? -
Use sessions, here is a tutorial to help http://djw-webdesign.awardspace.com/code.php?snippet=9
-
If you want some serious testing go to http://www.hellboundhackers.org/ and get one of them to test it
-
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.
-
thanks i tried $tags = preg_replace("/" . $search . "/", "<b style=\"color:#0000FF;\">\\1</b>",$tags); but no luck, and a few other variations
-
Try reading through some of these http://djw-webdesign.awardspace.com/snippet.php?cat=1¤tpage=1 And try http://www.tizag.com/phpT/forms.php
-
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
-
Might sound random, but why?? Why are you forcing yourself to wait? Doesn't make any sense.
-
Not bad, but not good! It would be better to use javascript or AJAX to show a real time loading
-
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.
-
Haha <?php $tags = make_safe($_POST['tags']); $tags = explode(",",$tags); $tags = array_unique($tags); $tags = implode(",",$tags); echo $tags; ?>
-
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); ?>
-
Using $tags = preg_replace("/" . $search . "/", "<b style=\"color:#0000FF;\">$1</b>",$tags); This doesn't do anything, it just shows the tag normally
-
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']; } ?>
-
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
-
[SOLVED] Wierd Validation errors, session ID
DeanWhitehouse replied to DeanWhitehouse's topic in PHP Coding Help
Used ini_set();, warning remember to put it before session_start(); -
[SOLVED] Wierd Validation errors, session ID
DeanWhitehouse replied to DeanWhitehouse's topic in PHP Coding Help
Could i use ini_set();?? e.g. <?php ini_set("session.use_only_cookies",1); ini_set("session.use_trans_sid",0); ?>