1,038 Posted Topics
Re: [QUOTE=khr2003;889481]Hi I am trying to modify a class and I found this code in it: [CODE] $query = " SELECT * FROM menus WHERE show = '1'"; $id = $this->menuid; if((isset($id)) && ($id != '')) { $query .= " and menuid in($id)"; } $query .= " ORDER BY menuorder ASC"; … | |
Re: I've seen a lot of strange code but I've never seen someone accidentally write Duff's device | |
Re: [QUOTE=slawted;889642]when i said im new to programming, i ment im new and only 15 years old that is serious about giving this ago, if you would be kind into show me where? thank you.[/QUOTE] The only output statement in your code, the hint would be that it has the word … | |
Re: [QUOTE=Atli;885639]Hi. Sure, I can give you an example. It's pretty basic at this point, but I assume you are going to be adding your own methods to it. Note that I don't store the actual password used for the connection, but rather a SHA1 has of it. [I](For security reasons)[/I] … | |
Re: [QUOTE=aditya2071990;883191]Video tutorials: [url]http://net.tutsplus.com/videos/screencasts/diving-into-php/[/url] But I am surprised at the no-bashing in this thread; usually, [I]someone[/I] would have posted a venomous "go do your own searching on google" message by now... :puzzled:[/QUOTE] There's no bashing because it was 5 YEARS AGO!!!!!!! It was a simpler time when people rarely bumped half-decade … | |
Re: @Josh, PHP 6 doesn't exist yet and wont for a long while :) For lonestar. getElementsByTagName returns a DOMNodeList which, when iterated over, each entry is a DOMNode which can act as a DOMElement which has the function getAttribute($attr_name); So you can do (in theory, see php.net/DOM): [code=php] $elemlist = … | |
Re: [QUOTE=tulipputih;887523]Thanks all, for your input.. I have tried all but none is success..the same error still appear on the same line. thanks[/QUOTE] Then show all of the code, not just one line. | |
Re: Since you're not adding the draggable behavior until someone clicks on it you won't be able to actually drag it until you release and click again. Place the .draggable() call in your [icode]$(document).ready()[/icode] function. You don't need to explicitly trigger the event either. That's what the draggable behavior does. | |
Re: This should be in the PHP forum, but at the same time it should not be. Read the FAQ in the PHP forum before you post again. | |
Re: [QUOTE=OmniX;884326]There are a few things that dont look right but : - What is all of this EOD stuff? Never seen it before in my life? - Check your names of the $_POST fields as they contain bad naming conventions - Last line should be "echo $theResults;" no quotes See … | |
Re: [QUOTE=OmniX;882489]when time is echoed what format is used? I usually use date as I can specify the format I wish to use?[/QUOTE] time() returns the unix timestamp, you have to use strftime to convert it to a human readable date | |
Re: Place an empty span next to the inputs and then instead of alert("Your blah met our requirements."); do something like [code=html] <input id="passField" name="passField" type="text" /><span></span>[/code] [code=javascript] var checkdiv = document.getElementById('passField').nextSibling; checkdiv.innerHTML = "<img src='somecheckpassimage.jpg' alt='OK' title='OK' />"; [/code] | |
Re: [QUOTE=jazu100;888137]yes yes. Could somebody just give a proper answer? Php.net hould have its own guides for this. :-/[/QUOTE] Read every detail of [url]http://us3.php.net/manual/en/features.commandline.php[/url] (Read the comments too) PHP CGI is used as a last resort, mainly because of the configuration pain in the butt. | |
Re: Please look at the dates before posting, there have been a lot of 1 year+ bumps lately. | |
Re: Please for the love of all that is good don't use Jodin's example. [code=php]echo json_encode($your_php_array);[/code] Done. | |
Re: He means the lightbox that pops up. Search for either thickbox or lightbox, (This is a Javascript issue so take further posts over to that forum) | |
Re: You can't block the user from doing anything in PHP or Javascript. You have to use a platform language like C/C++/Java/etc. I will repeat myself, you will NEVER, EVER be able to control a user's machine from the browser whether that be Javascript, or PHP, or ASP, or anything else. | |
Re: You can't have multiple -- in an HTML comment aside from the --> at the end, it's invalid. Secondly, you forgot the > on the beginning body tag. [code=html] <body> <!--body positioning--> <div id="bodypos"> <!-- header--> <div id="header"> <div id="logoposition"></div> <div id="banposition"></div> <div id="headpub"></div> <div id="menu"></div> </div> <!--header ends here--> … | |
Re: [code=javascript]this.options[ this.selectedIndex ].value[/code] is exactly the same as [code=javascript]this.value[/code] when applied to a select box. In getstates.php, your do{}while(); should be just while(){}. And remove the mysql_fetch_assoc after your mysql_query call. [code=php]<input name='<?PHP echo $currentrow;?>_Zip'." type='text' value='' size='10' maxlength='10' />[/code] Remove the ." after _Zip', so [code=php]<input name='<?PHP echo $currentrow;?>_Zip' … | |
Re: [QUOTE=seaders;886353]for anyone interested, it's the functions imagesx and imagesy that give you the width and height of a resource image.[/QUOTE] [url]http://php.net/GD[/url] The PHP documentation should be your first stop when you have a question like this. | |
Re: The { at the end, before the ?> should be }. | |
Re: Nothing will execute after your return statement. [url]http://php.net/return[/url] | |
Re: [url]http://php.net/switch[/url] Usually this would be achieved through a switch statement and include() | |
Re: Use one or the other, not both. PHP was originally used as a replacement for SSI bull. Bottom line is, don't use SSIs | |
Re: [QUOTE=Josh Connerty;883758]Yep make another file called page.php then use JavaScript and AJAX to retrieve it once your document is ready. In this page.php you use file_get_contents() to retrieve the files contents.[/QUOTE] Note that you cannot use AJAX to fetch content from a domain other than the one the script runs … | |
Re: Well if the data is web-based and presented with no download option then fetching the data from the page is called screen scraping. If it does provide a download option its just called downloading :) | |
Re: PHP has a built-in function to parse CSV files: [url]http://us3.php.net/manual/en/function.fgetcsv.php[/url] | |
Re: Well PHP can't play video, the user would never be able to see it :) Perhaps you should try the Javascript or Graphics and Multimedia forums ![]() | |
| |
Re: Try using [icode]intval($args[2])[/icode] instead of just [icode]$args[2][/icode] | |
Re: [QUOTE=peter6960;881873]Parse error: syntax error, unexpected T_VARIABLE, expecting ']' in /home/bluetek/public_html/dac/main.php on line 30 Line 30 is this part: [code=php] // This will echo out all the links to the downloads 28 $count = 1; 29 while( $row = mysql_fetch_array( ) ) { 30 if( $row[file$count] == 1 ) } 31 … | |
Re: Firstly, don't put this inside a loop [code=php] $sql = "SHOW COLUMNS FROM $dbname.dealerPrice"; $result = mysql_query($sql); [/code] That's going to be the same for each iteration of the loop so you're wasting database time. Do it above the loop and store the result in an array. Secondly, don't use … | |
Re: Yeah... you can't do that. It's up to the user. You can't and will never be able to have direct interaction with the user's filesystem outside of creating cookies. All you can do is check AFTER they submit the form to see if you got any errors during upload. | |
Re: [QUOTE=Ancient Dragon;882770]2. Why don't you translate it yourself.[/QUOTE] Well, that's obvious, she's says it's very simple. It is obviously below her to solve such a simple problem. | |
Re: [QUOTE=kambohg;882869]but dear i know all these thing but i cant have not good concept and logic u can telll me how i can creat good logic or what is the prob y i cant creat logic is it main dulness or any other thing[/QUOTE] If you knew those things then … | |
Re: If he wants the access database to send out forgotten credentials that tells me that you're storing passwords in plain text. That's a huge no-no. You should MD5 the passwords and have the only recovery method as resetting the password OR use reversible encryption which is more difficult. | |
Re: [code]#define DEBUG 1 // on[/code][code]//#define DEBUG 1 // off[/code] | |
Re: You can put anything you want in the email. And you wouldn't need a SQL table unless you're storing information in some way. | |
Re: I personally like Symfony [url]http://symfony-project.org[/url]. Open source, free, MIT licensed, huge community behind it and some of the best documentation of any framework available. | |
Re: [QUOTE=aarifameen;882590]is that the ans of my question?[/QUOTE] Yes, turn that in, quick, before it gets deleted! | |
Re: Try searching for pagination. If you can't find it with that then you aren't looking hard enough. | |
Re: Try using absolute paths(start with /, as opposed to relative that use ../) | |
Re: What exactly isn't working in safari/chrome (specifically what part of the CSS isn't working)? The PHP has nothing to do with it I can tell you that. | |
Re: It's usually better to add/remove CSS files for specific browsers using HTML conditions like so [code=html] <link rel="stylesheet" type="text/css" href="somestyle.css" /> <!--[if lte IE 7]> <link rel="stylesheet" type="text/css" href="ie7specific.css" /> <![endif]-->[/code] | |
Re: My guess is that the inner query is supposed to be querying the uservotes table, not the entries table. Also, you're using mysql_fetch_assoc on $r instead of $s. Don't use one letter variables, they are hard to follow and keep track of, as is obvious in this case. | |
Re: Visit both sites and look at the Developer or API links, they'll explain (if available) how to use their API | |
Re: Don't do that, there's a built-in PHP function. [icode]array_keys($array, "search_key")[/icode], that returns an array containing the indices for the searc_key | |
Re: HAHA, fire the developer, there's your feedback. Stylesheets promote a centralized design(reusability, consistency, etc.) They save time, are (most of the time) completely cross-browser compatible(you'll learn to hate IE6) | |
I was treading on a thin line for a while with the PHP forum but I have finally gone and lost all hope for this forum that I've called home for 4 years. And it only took 7 simple words for me to lose hope completely. [quote]and what do you … |
The End.