1,038 Posted Topics
Re: They don't have to be submit inputs, they can be button tags which set a field to say clockin or clockout and then submit the form though you could do exactly the same thing with submit inputs | |
Re: [QUOTE=miankhel;947059]realy i did not understand that what function over riding means can any body help me for that please[/QUOTE] A) Use google or Daniweb Search B) Say you have a function that you want to work on both strings and chars for example I have a function to convert a … | |
Re: [url]http://php.net/SimpleXML[/url], You might want to take a look at the xpath stuff. | |
Re: [QUOTE=v2v3;942232]Can anyone help me out on this?[/QUOTE] Google can, wikipedia can, really any method of self-improvement beyond asking for help before trying to help yourself. | |
Re: [url]http://php.net/is_float[/url] The manual is your friend | |
Re: [code=javascript]window.onunload = removeLoggedIn();[/code] Should Be [code=javascript]window.onunload = function () { removeLoggedIn(); }; // OR window.onunload = removeLoggedIn;[/code] You don't want to assign the [B]result[/B] of removeLoggedIn to the onunload, you just want to assign the function to it. | |
Re: http://php.net/print_r]print_r[/url][/icode] will print an array and its contents like you see in Array ( [0] => this [1] => sentence ) http://php.net/echo]echo[/url][/icode] simply echoes a string. It says "Array" because when an array is converted to a string that is the output. | |
Re: I'm most familiar with Trac ([url]http://trac.edgewall.org/[/url]) which is web (python) based and haven't really run across any SVN source/bug tracking system that is as user-friendly. Whatever you do, stay away from SourceSafe | |
Re: Might want to show the code so we can point out what to change | |
Re: [QUOTE=ivanichi;939629]Hi..friend.. anybody help me, how to display motherboard serial with php script ? thanks... :)[/QUOTE] You can't. PHP is a server-side language, it is not allowed to get anywhere near the end-user's hardware. Hell, it doesn't even touch the user's browser outside of knowing which browser it is. | |
Re: [QUOTE=arunajasmine;939528]Hi, i am doing an application which make use of JQuery and Cakephp . In this i am using like the following to retrieve the values from my controller side [CODE] var getformid; $.getJSON("http://localhost/FormBuilder/index.php/forms/getFormEntry", function(json) { getformid=json.forms[0]["id"]; alert("Form id inside "+getformid); });//json alert("Form id ouside "+getformid);[/CODE] In the above code, … | |
Re: You can just use file_get_contents to, well, get the contents of the file then when you output it just wrap it in a [icode]<pre>[/icode] tag to keep the original formatting. | |
Re: they're called subdomains and it's almost always not page1.domain.com it's subsite.domain.com You don't want to use subdomains for individual pages and whether it's a subdomain or a normal page has very, very, very little if anything to do with search engine ranking. | |
Re: You're missing a bunch so you either have broken javascript or you didn't copy/paste directly. It should look like: [code=javascript]$('#css-style-def').click(function () { var newText = $('console-msgs').html(); });[/code] $ is (in most cases) a jQuery function that finds an element based on the CSS selector passed so that particular code says: … | |
Re: [url]http://php.net/exec[/url], your best bet is probably shell_exec | |
Re: It's really up to you, everyone learns differently. For you it may help you learn faster. Personally, I don't know ActionScript so I can't attest to their similarity. With PHP having so many built-in functions and a pretty short learning curve, after you learn the basic syntax you can always … | |
Re: If you want to write your forum from scratch instead of using one of the umpteen mature open-source forums then what's the point of looking elsewhere on how to do it. If you know the basics of PHP and MySQL then design it yourself. And by design I don't mean … ![]() | |
Re: Well you're saving the user ids somewhere so just save a count of logins along with it. If it is above a certain number (in this case, 2) just don't allow them to log in. | |
Re: If you're on Linux you don't have a whole lot of choices but you're also in luck because of the few choices you have they're all really good. Zend Studio, Eclipse + PDT, gVim (my personal favorite) are probably the 3 biggest/best choices. | |
Re: Your PHP can go anywhere since the browser never sees it but the doctype must be the first thing the browser sees followed by the html tag. [B]OK[/B] [code=php] <?php // blahity blah ?> <!DOCTYPE html blahity blah> <html> [/code] [B]Not OK[/B] [code=php] <?php echo 'Hello'; // this puts text … | |
Re: Doesn't quite work that way. There are hacks you can do but in general you'll want something along these lines [code=php] $var1 = 'yes'; $var2 = 'yes'; $var3 = 'no'; if ($var1 == 'yes' && $var2 == 'yes' && $var3 == 'yes') { // do something } else { // … | |
Re: Well it looks like you're trying to input duplicate records. The fix is to not do that and to turn error_reporting off in a live environment | |
Re: Any reason why it's defined as abstract, do you plan on extending it later to support different DBs? Also, as a style thing, usually classes start with a capital letter and the names are CamelCased. Secondly, you might want to make _conn private given that you have public functions to … | |
Re: Because the Javascript gods are angry at you for reviving a 2 year old thread. On a more serious note, two things: 1) You're in onclick so you don't need [icode]javascript:[/icode], 2) You have to give something to alert() or it wont' do anything ( [icode]alert('Hello World!');[/icode] ) | |
Re: You do realize that the error says ze1 as in z - e - one, and yours says zel as in z - e - L | |
Re: A) Stop using PHP4 or if you're using PHP5 [B]STOP USING [icode]ereg[/icode][/B] B) Stop using @, it's slow and its sole purpose is to hide errors ([B]BAD[/B]) C) Don't use/abuse regular expression before you understand them (Case in point [icode]"^[A-z0-9+. -]*[']?[A-z0-9+. -]*$"[/icode] D) [B]DON'T MIX LOGIC WITH HTML[/B] | |
Re: Use parenthesis for grouping just like math [code=sql]SELECT * FROM sometable WHERE somefield = 1 AND (anotherfield = 1 OR anotherfield = 12)[/code] | |
Re: Well firstly, how 'bout you give us a non-minified version of the javascript. I am not about to go wading through that block of crap. And by non-minifid I mean put some damn newlines in there, perhaps some tabs or spaces, some form of indentation. If it was written this … | |
Re: [code=php] $query = 'SELECT somevalue FROM sometable WHERE somevalue IS NOT NULL'; $res = mysql_query($query); if (!$res) { die(mysql_error()); } $count = mysql_num_rows($res); $total = 0; while($row = mysql_fetch_assoc($res)) { $total += intval($row['somevalue']); } $avg = ($count === 0) ? 0 : $total / $count;[/code] | |
Re: You're asking how a business benefits from not having to pay for hundreds/thousands of dollars in licensing fees? | |
Re: I'd be willing to bet the error isn't in that function. And what the heck is the point of using AJAX if you're just going to rewrite the response to your own static HTML anyway? You're completely defeating the purpose of AJAX. | |
Re: Start here, it answers all of your questions [url]http://www.php.net/manual/[/url] | |
Re: They can't. A private member can only be access from the direct parent. Even child classes can't get access to it, that's what protected is for. [url]http://www.parashift.com/c++-faq-lite/friends.html[/url] | |
Re: Nope, you have to use a server-side language. Javascript lives in the browser so it can't directly touch either your server or your client's machine. You can have Javascript make a request to the server which provides a listing but Javascript itself can't. | |
Re: [QUOTE=Menster;927142] $_REQUEST: is sort of a combination of the two, any vars in either $_GET or $_POST will appear in $_REQUEST. However, most experienced programmers will warn you against using this for various reasons, rather just stick to $_GET and $_POST.[/QUOTE] [icode]$_REQUEST[/icode]Also includes [icode]$_COOKIE[/icode]. | |
Re: Well there should never be any HTML inside a stylesheet so you might want to show us some of your code. ![]() | |
Re: This is a CSS issue, it should be there but you can get rid of it with this [code=css]a > img { border: none }[/code] | |
Re: Try just returning false from the function. Also, in your onkeypress attribute you don't need "javascript:" it knows what you're trying to do if you just put typed(event); | |
Re: [code=php] function count_dir($dirname) { return count(array_slice(scandir($dir), 2)); } $seasons = array('spring', 'summer', 'winter', 'fall'); $springcount = $summercount = $fallcount = $wintercount = 0; foreach ($seasons as $season) { $seasoncnt = $season . 'count'; $$seasoncnt = count_dir("images/" . $season); } // done [/code] Whoops: For Reference [url=http://us3.php.net/manual/en/language.variables.variable.php]Variable Variables[/url], [url]http://php.net/scandir[/url], [url]http://php.net/array_slice[/url] | |
Re: you're already in PHP, you don't need to do [icode]<?php echo[/icode] Also, you're in double quotes so you must surround the [icode]$onrow["index"][/icode] with {} ie., [icode]{$onrow["index"]}[/icode] | |
Re: [QUOTE=VernonDozier;926319][code=cplusplus] int flipLocation(int numberUsed) { cout << "Enter flip location "; cin >> flipLocation; if (flipLocation > numberUsed) cout << "Invalid flip location"; cout << "Enter a new flip location "; cin >> flipLocation; return flipLocation; }[/code] I see lines 6 through 8 are indented. I assume that means they … | |
Re: You could have Javascript just create an array of data, JSON encode the array, set that to a form value and submit the form to a PHP page which itself creates the CSV instead of having PHP or Javascript do it all | |
Re: Cool, how's that working out for you? [url]http://www.daniweb.com/forums/announcement8-2.html[/url] | |
Re: Take that damn @ out from in front of the first line. @ suppresses errors so you can't see them. | |
Re: Firstly, for both scripts do [code=php]$ticket_number = intval($_POST['Ticket_Number']);[/code] And use that instead of $_POST['Ticket_Number'] just in case someone enters in something that isn't a number. Secondly use a SELECT statement to see if a ticket with that number exists and if it does execute the DELETE like so: [code=php]$query = … | |
Re: Why are you using mysql_real_escape string for your quote but not for $table which is coming directly from POST?. Also what do you mean the file doesn't work, is the csv file empty or what? | |
Re: [url]php.net/arrays[/url] and [url]php.net/foreach[/url]. Go read those. | |
Re: With a foreach, $key is the key of the array and obviously, $value is the value so for [code]$array = array('key1' => 'value1', 'key2' => 'value2');[/code] foreach will act like this [code=php] foreach ($array as $key => $value) { echo $key . '=' . $value; // key1 = value1, etc. … | |
Re: Lightbox, thickbox, tightbox, use Google and take your pick. | |
The End.