1,038 Posted Topics
Re: Well there's no "suggestion", if you get that error then you are sending data before you are using that function. You can use functions above [icode]header()[/icode] but you [b]cannot[/b] output anything before the heaader. [COLOR="Green"]OK[/COLOR] [code=php] $a = 2 + 2; header('Location: example.com'); [/code] [COLOR="Red"]BAD[/COLOR] [code=php] $a = 2 + … | |
Re: The simplest solution I've found, and many others since it seemed to spread across the web like wildfire, is the [url=jeroenwijering.com]JW Media Player[/url]. It is a flash based media player with an external javascript API. Incredibly easy to use, there are a ton of tutorials and a pretty thorough tutorial … | |
Re: Sorry if you got confused, this is the PHP forum, you can take a look at the [url=http://www.daniweb.com/forums/forum24.html]JSP Forum[/url] for JSP help. | |
Re: You are using single quotes (') for your $search string. Variables aren't parsed inside single quotes. So the search string right now is literally '/$_GET[word]/i' | |
Re: If it's on the web and you're already using PHP you might want to look into using a MySQL database instead of a flatfile, they are [b]much[/b] easier to work with. | |
Re: The only thing that doesn't look right is the [inlinecode]Upper[/inlinecode] call. | |
Re: [QUOTE=Geek-Master;512069]I may be wrong but I've never heard of C++ being used for the web. Unless its for some web app DLLs and not server side scripting. C# would be something you'd use, which isn't a variation of C or C++. I've heard from other developers that C# is a … | |
Re: Any reason why you want to open 30 windows, any tabbed browser can eliminate the memory usage. I'd have to do the obligatory [url=http://www.mozilla.org]Firefox[/url] whoring as the main one. | |
Re: You cannot have more than one element use the same ID, that is what is causing the error. IDs are meant to be unique identifiers, classes are meant to be reusable. ie., [code=css] #head h2.highlight{color:#FF0000;} #body h2.highlight{color:#0000FF;} h2.highlight{color:#00FF00;} [/code] [code=html] <div id="head"> <!-- this will be red --> <h2 class="highlight">Hello … | |
Re: Firstly, you don't need to put a [inlinecode]strong[/inlinecode] tag inside [inlinecode]h1[/inlinecode] since it already bolds anything in h1. Secondly, an image link is created with [inlinecode]<img src="image link here" alt="text to display if it doesn't show up" />[/inlinecode] | |
Re: I had a similar problem, it wasn't the box that you mentioned but it was a video of a grandma kicking a baby, there were no processes/hidden processes to speak of and no installed programs nor registry entries. How I got rid of it was pure luck, normally the mouse … | |
Re: It's called the arrow operator, and when using it you don't prepend the member with $, ie., [code=php] class SomeClass{ private $blah = "Hello"; function getBlah(){return $this->blah;} function setBlah($value){$this->blah = $value;} } [/code] In another file [code=php] $something = new SomeClass(); $myBlah = $something->getBlah(); echo $myBlah; //"Hello" $something->setBlah("World"); $myBlah = … | |
Re: What do you want it to do? You didn't really explain that. To have an image in a page you do [inlinecode]<img src='image location' alt='If it doesn't show up' />[/inlinecode] for a favicon it's [inlinecode]<link rel='shortcut icon' href='image location' type='image/(mimetype)' />[/inlinecode] | |
Re: [QUOTE=Batool110;552864]i am new to dis programming world n programming languages ...so plz help me n tell how i b a gud programmer...my coding is week wat shall i do 2 improve it plz help me:([/QUOTE] As the previous posters said, there are many good starter guides. However, if you stick … | |
Re: In Internet Explorer 7, the 'label' property is equivalent to the innerText property in Firefox. So Firefox ignores the label property and uses innerText (Group) whereas IE sees the label property(supGrpSrch0) and overrides the innerText. | |
Re: This is a batch script I wrote about a year ago to use FFMPEG to convert mpeg or any video format really into flv [code]@echo off setlocal set getdir="%CD%" set pathto=<put path to ffmpeg here> cd %pathto% ffmpeg.exe -i %getdir%\%1 -s 640x480 -ar 44100 -r 25 -sameq %getdir%\%1.flv cd %getdir%[/code] … | |
Re: Change folder permission so only the server daemon has read privileges, may or may not work :) | |
Re: Well you can't exactly control that because even if it opens in a new window for one user another might have their settings to override opening pages in a new window IE., no matter what you do it will open in a new tab. Controlling the user is a bit … | |
Re: [code=php]<?php session_start(); if($_SESSION["status"]="logged") { session_unset(); session_destroy(); header( "Location:../index.php" ); exit(); } else { if ($_SESSION["status"]="not logged") { //the session variable isn't registered, the user shouldn't even be on this page header( "Location:../index.php" ); exit(); } } ?>[/code] Take a look at those if statements. Those are SETTING $_SESSION['status'], not comparing … | |
Re: Please post relevant code only. IE., any code that has changed since the last time it worked. Posting ~1k lines of code then saying "What's wrong" doesn't help. Also, if you are using a class that has been worked on as much as this then the problem most likely lies … | |
Re: When checkboxes are sent in requests as "on" if they are checked, if they are not checked they aren't sent at all. You're also missing an if on line 20 | |
Re: Well firstly [code=php]$result = mysql_query("SELECT * FROM bak_bill_cust"); while( $row = mysql_fetch_array( $result ) ): $option = $row["cust_code"]; echo "<option value='$row[cust_code]'>$row[cust_code]</option>"; endwhile;[/code] >>> [code=php]$result = mysql_query("SELECT * FROM bak_bill_cust"); while( $row = mysql_fetch_assoc( $result ) ) { $option = $row["cust_code"]; echo "<option value='$option'>$option</option>"; }[/code] I actually wasn't even aware PHP … | |
Re: There is [in_array](http://us.php.net/inarray) But I'm not entirely sure if that's what you're looking for. | |
Re: I would have to seriously recommend you do not use JavaScript to validate the passwords. Use a server-side language so the script cannot be viewed by the public. If you publish your password rules then you pretty much give bruce-forcers a head start. It's a bit like saying, "I wont … | |
Re: You can't send any data before you try to send headers. All that text above the php tags must be moved below. | |
Re: If you are using a server-side language then manipulate the header to send [code]Cache-Control: no-cache Pragma: no-cache[/code] This tells the browser to get a fresh copy | |
Re: Well you could have the function name as the query key and the parameters as the query value IE., [inlinecode]test.com/?doThis=param1,param2,param3[/inlinecode] Then in PHP [code=php]foreach($_GET as $key=>value){ $values = split(",",$value); $key($values[0],$values[1],$values[2]); }[/code] Obviously, that's just an example but that's the jist of it. Not to mention that it is a GIGANTIC … | |
Finally hit 300 posts, and only took a little under 3 years. As a side note I think this is the first time I've ever posted in the Geeks' Lounge. | |
Re: GMail's obfuscation isn't intentional, it's a side effect of minifying your javascript to improve speed. Things like JSmin can sometimes cut the size of JS files by half, now imagine if you're Google and you have about 15 million people viewing a page per day, reducing the size of a … | |
Re: [code=php] "SELECT * FROM `table3` WHERE name LIKE '%hilgard's%'" [/code] | |
Re: Whatever the container is in (div, table, etc.) use CSS and set [inlinecode]overflow: scroll;[/inlinecode] For example [code=html]<div style="overflow:scroll">This will have a scrollbar</div>[/code] | |
Re: Absolutely, first you click on start then click on your browser (either Firefox, Opera, Safari, IE) Then click the address bar so the text is highlighted. Now press the delete key. The next step is to type the following text exactly as I have it here [inlinecode]w w w . … | |
Re: Absolutely [code=javascript] function addInput(parentID) { newInput = document.createElement('input'); newInput.type = 'file'; newInput.name = '<put name you want here>'; document.getElementByID(parentID).appendChild(newInput); } [/code] So if you have a form such as [code=html]<form action="something.php" method="POST" enctype="multipart/form-data" id='imagesForm'>[/code] You would have something along this lines [code=html]<input type="button" onclick="addInput('imagesForm')" value="Upload Another" />[/code] | |
Re: You can't code anything in HTML but if you are using a server-side language like PHP, ASP, etc. they all have functionality to parse XML files though I've only dealt with PHP XML parsing | |
Re: Perhaps you haven't seen the large print pretty much everywhere on every forum that says we won't give homework help to those who don't show effort. So show us you've at least attempted it then we will help you. | |
Re: I've used no-ip before and it's a pretty good free temporary solution. [url]http://www.no-ip.com/[/url] | |
Re: Go look up lightboxes [url]http://www.huddletogether.com/projects/lightbox2/[/url] | |
Re: SQL Injection is probably your biggest threat with logins since it's pretty simple to defeat brute force attacks with lockout. addslashes() only goes so far, the same goes for magic_quotes_gpc | |
Re: Well if you have linux then it never hurts to learn the linux commands (cron) whereas if you have Windows you will be using AT instead of cron. In either case getting to know your way around the command line is a good thing. | |
Re: [QUOTE=hooray;522810]I am a Javascript newb, and I am haveing some trouble with my arguments. [code=php] while($row=mysql_fetch_array($query)) { echo ' <td class="bar" onmouseover=Javascript:openMenu("' . $row['category'] . '") onmouseout=Javascript:closeMenu("' . $row['category'] . '")> <a href="category.php?cat=' . $row['category'] . '" class="top_menu"><div>' . $row['category'] . '</div></a><div>'; [/code][/QUOTE] Based on the W3C standards you [b]must[/b] … | |
Re: [code=css].tabbar_homepage li.current a b {[/code] To explain what this is doing we have the first bit [inlinecode].tabbar_homepage[/inlinecode] which means that what we're going to be working with is anything with that class applied. Second is [inlinecode]li[/inlinecode] which tells it any list-item element which that class applied, thirdly we have .current … | |
Re: A gif that has the same animation as a video will be MUCH larger. Also, there are no "commands" in HTML, I believe you mean Javascript. So, depending on which video player you use you should be able to get the amount played and the length of the video. You … | |
Re: Put the require after the header, also, you do not need that extremely long list of echoes, this works just as well [code=php] <?php if(Something) //blah else { ?> <html> <head><title>Test</title></head> <body> Blah </body> </html> <? } ?> [/code] | |
Re: You have the WHERE clauses reversed [code=php]$query = "select * from tbl_accounts WHERE $un = email AND $pw = password";[/code] Should be [code=php]$query = "select * from tbl_accounts WHERE email = '$un' AND password = '$pw'";[/code] | |
Re: The simplest fib sequence you can write is pretty much [code=c++]int fib( int n ){return ( n<2 )?n:fib( n-1 )+fib( n-2 );}[/code] | |
Re: Well, firstly all of these things [inlinecode]<?php echo $something ?>[/inlinecode] can be replaced by [inlinecode]<?=$something?>[/inlinecode]. Aside from that just create an image with a grey border and nothing else(maybe a white background), call it blank and then make the image src "blank.jpg" or whatever you name it. Changing the class … | |
I've come across a bit of a conundrum. Firefox handles DOM manipulation based on the standard which (would'a'thunk-it?) works. However, Internet Explorer does not. So here's the situation. I've got a select box and a remove button which, in Firefox, works as advertised, ie., removes the selected element from the … | |
Re: In simple terms, yes, it is a float. If you don't include the f I believe, technically, it is considered a double. |
The End.