PHP - Moved: Not Sure If This Is / Can Be Done Php Based?
This topic has been moved to Ajax Help.
http://www.phpfreaks.com/forums/index.php?topic=359538.0 Similar TutorialsThis topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=320834.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=358615.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=354366.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=355225.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=359077.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=315834.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=308916.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=358122.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=317036.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=349871.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=352302.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=323045.0 I have this array: Code: [Select] Array ( [jan] => 2 [feb] => 1 [mar] => 2 [apr] => 1 ) ..and I want to return: Code: [Select] Array ('jan', 'mar') As in, find the 2 elements with the highest count and put them in an array. What is the simplest way to achieve this? Hi all, Relitively new to PHP but am trying to code a site that dynamically creates urls using Joomla CMS. Basically I'd like a div to show on pages' url starts /component/.... but hide it if not. The urls of the pages on which the div is to be hidden start /index.php?. I've tried Code: [Select] <?php if (strpos($_SERVER['REQUEST_URI'], 'component') > 0) { echo '<div id=\"stuffdiv\">stuff</script></div>';} ?> only issue is... its always fasle hence the div never shows. If i replace > with >= its always true, and appears on all pages, even those not containing 'component'... Can someone tell me if this should work or if Im being really stupid? Thanks in advance! Tom hi everyone. i need to figure out how to display one tr or another based on if N/A appears in one of the TR's. if i use: 'if ($result['NoChargeFile'] = 'N/A')' it repeats N/A for all rows. if i use: 'if ($result['NoChargeFile'] = N/A)' only the TotalFees TR is displays. What i need to do is display the TOTALFEES if the NOCHARGEFILE is not N/A. If NOCHARGEFILE is N/A, display N/A instead of the TOTALFEES. Any ideas how to fix this issue? thanks. Code: [Select] <?php echo "<table width='100%' border='0' cellpadding='1'>"; $string = $string."$pages->limit"; $query = mysql_query($string) or die (mysql_error()); $result = mysql_fetch_array($query); if($result==true) { do { echo "<tr>"; echo '<td nowrap>' . $result['CompanyName'] . '</td>'; echo '<td nowrap>' . $result['CompanyReferenceNumber'] . '</td>'; if ($result['NoChargeFile'] = 'N/A') { echo '<td nowrap>' . $result['NoChargeFile'] . '</td>'; } else { echo '<td nowrap>' . $result['TotalFees'] . '</td>'; } echo '<td nowrap>' . $result['DateRecorded'] . '</td>'; echo '<td nowrap>' . $result['DateClosed'] . '</td>'; echo "</tr>"; } while($result = mysql_fetch_array($query)); } // close table> echo "</table><hr>"; ?> I figured it out. i need == not =. Hello folks. I have a system showing stock of products. Now I want to colorize the value based on how much it is. For example 0 is red and then green is 10 000 and up. So the range should be like a smooth gradient. What's the algorithm? Hi, I need to create a secure API at work so that 2 systems can interact with each other and request data (json format). I need to use an API key for this but don't want to use an API key stored in a database, what is the best way to go about this? I would like to use some sort of encryption algorithm and a white list of a few values to validate against once decrypted, is this safe and are there any algorithms I can use to generate my keys and white list? Hello. I want to make a web-based rpg with mysql and php but need alot of help, I tryed once and failed. Please msn me: cginbarrhaven@hotmail.com I need LOTS of help. Im stuck! Zeroth I have a page where I want a success and a fail response. It's a contact page so, if they fill in all that's required, and send, a success "message" will pop up but if they send but for some reason, it fails, to display a fail "message". What it does right now is the fail and success are constantly visible regardless. So how do I make it display the corresponding message accordingly? *Also how am I to make the text within the boxes invisible ? But that's lower priority I am trying to write a script for a puzzle based on the user's IP address, but I just can't wrap my head around how to do it. Essentially, when the visitor loads the page two things happen: (1) a PHP application returns an image to serve as a background for the formula, (2) implement the algorithm of generating the formula based on IP, that is displayed on the image.
The puzzle itself would be in the form of ABC.DEF.GHI.JKL where each letter would be associated with the corresponding digit in their IP addy. The user is trying to solve for partial map coordinates. So, let's say the correct answer is N 35 54.374 W 084 01.829 and the user's IP is 075.036.025.058. The formula returned and placed on the image would be N 35 54. (E) (B) (F - H) W 084 01. (L) (H) (B + H) Whatever I use as the final correct answer will not change and be the same for all users; only the puzzle formula would differ for each user as it would be based on their IP at the moment. Any help here would be greatly appreciated. Thanks! Gary |