-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
When you use a doctype it helps you to weed out the errors in your HTML and make it run more smoothly on other or all browsers if you have the patience. If you don't use one then your page may not look right or something really minuet that will bug the hell out of you. here's some reading material http://alistapart.com/stories/doctype/
-
you need a function that censors words first --note this function passes by reference function censorWord($word) { for($i=0, $i if($i != 0 || $i != strlen($word)++) $word{$i} = "*"; } return $word; } then do the same idea as before $text = "I like balls with poop and a bit of bugger"; $lines = file("naughty_words.txt"); foreach($lines as $line) { $text = str_replace($line, censorWord($line), $text); } but in your naugty.txt file just name all the words down the line you won't need the equals marks and such just
-
there isn't really a norm to it. You just find the one that works best for you and stick with it. I personally like to count them at query time...using COUNT(*) as whatever...then I can just access that variable later. If you know you're gonna need that count a lot in your code I'd recommend using COUNT(*) to save code if you just need only one time...then use mysql_num_rows()
-
mkoga has a good idea but also you might want to try putting your thumbnail in a DIV instead
-
create a DIV for the large image to appear in..near the blue box give it an ID like preview then create a function in javascript to do the image changing function swapImage(imageURL) { document.getElementByID("preview").style.backgroundImage = "url(\"" + imageURL + "\")"; } then for each of your thumbnail.....whatever tag you have them in give them an onMouseOver action
-
Using an oject reference directly return from a function call
Zane replied to johnwarde's topic in PHP Coding Help
have you tried it yet? try it and you'll know if it works or not -
doesn't work for me says Columbia, SC when really I'm in Sylva, NC my zipcode here is 28779
-
put this at the very beginning of your code and tell us if it returns anything error_reporting(E_ALL);
-
[quote] <?php echo "Hello World!"; ?> [/quote] [quote]the include page comes up blank.[/quote] I don't see any include statements in the code above. Where's the code where you're including a page
-
well instead of giving an id as a parameter pass 'this' and you'll already have the element for instance [code] <a href="#" alt="Active Members" onClick="toggle_visibility(this)"> function toggle_visibility(obj) { if(obj.style.display == 'none') obj.style.display = 'block'; else obj.style.display = 'none'; } [/code] and secondly you could use a ternary for your function to shorten it [code] function toggle_visibility(obj) { obj.style.display = obj.style.display == 'none'?'block':'none'; } [/code]
-
just set them to display: none in your stylesheet the stylesheet is loaded when the page is loaded
-
omg...is it just me or is that server extremely extremely slowwwwwww
-
How to upgrade from php 5.x to 5.2.0 ?
Zane replied to rotto's topic in PHP Installation and Configuration
locate your current PHP folder and rename it to [itsCurrentName]OLD unzip php 5.2.0 to [itsCurrentName] and copy all the DLLs in the NEW php root directory to the Apache/bin directory overwriting existing ones pretty much it .. if you had any thing changed in your OLD php.ini file go get it and replace copy over the NEW one. your php.ini file goes in the Apache/bin folder as well -
and there's also readonly [code]<input readonly name='fred' value='stone'>[/code]
-
on the response.php page you need to give it an XML header and then it will automatically save so to speak I don't know how response.php works... like thorpe stressed, we need code but on response.php you should put header("Content-type: text/xml"); and get rid of everything else I.E the body tag the html tags the meta tag
-
here's a script from hotscripts http://www.hotscripts.com/Detailed/13628.html
-
although I've never seen an input tag with a src attribute, this is how you'd combine them /<\s?(img|input)\s+[^>]*(src\s*=\s*([\"']+.*[\"']+))?([^\"' >]+)[\"' >]/isU at least that's what I think
-
[code]SELECT * FROM table WHERE name REGEXP 'abc'[/code]
-
AJAX is basically just a set use of javascript functions it's more of a strategy than a programming language no I'm not going to write the code for you. search the forums for AJAX...you're sure to find an example to work from not necessarily for combo boxes but at least some good learning material try this thread for example http://www.phpfreaks.com/forums/index.php/topic,115581.0.html if you really need someone to write it all for you...post in the Freelancing board
-
you would create an AJAX function to fill those boxes based on a parameter.... and you pass that parameter when you select something with the first combobox for instance in pseudocode onchange of combobox1 fillBox2(box1.selectedIndex)
-
oh... hmm... did you try absolute positioning...them on top of another
-
Here are the CSS properties for opacity General Property [code]opacity:.25;[/code] Internet Explorer [code]filter:alpha(opacity=25);[/code] Firefox [code]-moz-opacity:.25;[/code] your best best is to set it like this [code]filter:alpha(opacity=25);-moz-opacity:.25;opacity:.25;[/code]
-
there's no function for it but you could always do this $exTime = microtime(); mysql_query("your query"); echo "Query took " . microtime() - $exTime . " seconds";
-
buyer details? shouldn't it buyer_details you can't have a space in the name