Jump to content

J.Daniels

Members
  • Posts

    143
  • Joined

  • Last visited

    Never

Everything posted by J.Daniels

  1. You can also just send a no cache header on your login page. This will cause the page to refresh every time it is visited. <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> Taken from the PHP Manual
  2. Do you mean you want to share part of the filesystem?
  3. If each url is followed by a <br>, you can explode by the <br>, then loop through the array to add it back in with the number: $linksArray = explode('<br>', $links); $counter = 1; $result = ''; foreach ($linksArray as $l) { $result .= $l . '<br> ' . $counter . ' '; $counter++; }
  4. What version of MySQL are you using? Version 5 is picker about the default int definitions. Try changing tables.sql to this: # # Table structure for table `groups` # CREATE TABLE `groups` ( `groupid` varchar(10) NOT NULL default '', `gid` int(10) unsigned NOT NULL auto_increment, `members` varchar(255) NOT NULL default '', PRIMARY KEY (`gid`) ) TYPE=InnoDB ; # # Table structure for table `users` # CREATE TABLE `users` ( `id` smallint(2) NOT NULL auto_increment, `userid` varchar(10) NOT NULL default '', `uid` int(10) unsigned NOT NULL default 0, `gid` int(10) unsigned NOT NULL default 0, `passwd` varchar(255) NOT NULL default '', `homedir` varchar(255) NOT NULL default '', `comment` varchar(255) NOT NULL default '', `disabled` int(10) unsigned NOT NULL default '0', `shell` varchar(20) NOT NULL default '/sbin/nologin', `email` varchar(255) NOT NULL default '', `name` varchar(255) NOT NULL default '', `ul_bytes` bigint(20) NOT NULL default 0, `dl_bytes` bigint(20) NOT NULL default 0, `login_count` bigint(20) NOT NULL default 0, `dl_count` bigint(20) NOT NULL default 0, `ul_count` bigint(20) NOT NULL default 0, `last_login` datetime default NULL, PRIMARY KEY (`id`) ) TYPE=InnoDB ;
  5. This may be the start of your problem. <div id="bkOpt"> <table width="720" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="2"><h3>Tom/Bass/Kick Drum Options</h3></td> </tr> <tr> <td valign="top" colspan="2" align="left" width="100%" class="r3">Tom/Bass Upgrades</td> </tr> <tr> <td>No Upgrades Chosen</td> </tr> </table> </tr> You have an opening div, a full table, then a closing </tr>. If I change it to: <div id="bkOpt"> <table width="720" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="2"><h3>Tom/Bass/Kick Drum Options</h3></td> </tr> <tr> <td valign="top" colspan="2" align="left" width="100%" class="r3">Tom/Bass Upgrades</td> </tr> <tr> <td>No Upgrades Chosen</td> </tr> </table> <table> then it works as expected. Try validating your code through the W3C validator.
  6. To create another FULLTEXT index, run this in phpmyadmin: CREATE FULLTEXT INDEX newIndex ON affiliSt_products1 (prodName,prodBrand,prodCategory);
  7. The problem with your switch statement is that if complexfunction() is false, do y; won't execute. if ($a && complexandtimeconsumingfunction()) { do x; } else { do y; } This will work because if $a is false, it will not continue with the second part of the conditional.
  8. Check out strpos() which will return the position of the first occurrence or -1 if it doesn't exist.
  9. You can use any block type elements including all the ones listed in the error or the fieldset / legend elements.
  10. Apparently, forms are block elements, but can only contain block level children. I'm not sure how reliable this is, but i got it from here: http://dorward.me.uk/www/element-not-allowed/
  11. It was my mistake. The MATCH function must match a FULLTEXT index. To create a new index see the MySQL Reference Manual
  12. You were saying that you couldn't use the SUM statement in your SQL query. As you loop through your result set and determine that a value needs to be added to the total, add it to a variable holding the total.
  13. This is similar to what xtopolis said, You can create a generated token from the form page, and pass it in a hidden field to the processing page. This will at least disable any outside form from submitting. If the page is loaded then scraped, it's difficult to determine whether it was loaded by a human or script without some type of captcha.
  14. If you don't want to search the product description, I believe you just need to take it out of the MATCH function: if ($indcount == 0) { $sql = "SELECT *, ( (1.3 * (MATCH(prodName) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) + (0.6 * (MATCH(merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE))) ) AS relevance FROM affiliSt_products1 WHERE ( MATCH(prodName,merchant,prodCategory,prodBrand) AGAINST (".quote_smart($pluspieces)." IN BOOLEAN MODE) ) HAVING relevance > 0 AND dbProdID != '".$pDetails['dbProdID']."' ORDER BY relevance DESC LIMIT 0, ".$maxRows_product.""; } else { $sql = "SELECT * FROM affiliSt_products1 WHERE MATCH (prodName,prodBrand,prodCategory) AGAINST (".quote_smart($pluspieces).") AND dbProdID != '".$pDetails['dbProdID']."' LIMIT 0, ".$maxRows_product.""; }
  15. Have you tested that statement? The syntax looks correct, however, your conditionals would return anything outside of the date range you specified.
  16. In the function definition, you are specifying that it return by reference: public static function & gvar($i) { This is from Passing By References in the PHP manual
  17. PHP is actually executing the command. The problem lies with the iptables setup. If you control the server here is something that I found that may help: http://www.linuxquestions.org/questions/linux-networking-3/iptables-v1.3.8-cant-initialize-iptables-table-filter-577212/ If you are hosted, you'll have to contact your host.
  18. Maybe I'm not understanding the question correctly, but you should be able to hold the total cost in a variable: $totalCost = 0; while (<loop through db results>) { if (<condition>) { $totalCost += $cost; } }
  19. It may be because of the parent nav container, since the width is set to 125px. When I moved the "salad" container above: <div id="wrapper"> <div id="salad"> <div id="lettuce"> </div> <div class="content">Tip of the day: This will not contain tips of the day.</div> </div> <div id="nav"> <div id="logo"></div> ... it appears to render the way you want.
  20. If it is the same version of IE on each computer, there may be some personal settings that are different. For example, the color of links.
  21. RewriteCond %{REQUEST_FILENAME} !-d does not apply the rewrite rule if the directory exists.
  22. It is because of this part of the code: if ($decimal > 2147483647) { $decimal -= 4294967296; } The number I get right before this is 3573956936
  23. In Seamonkey, everything appears to be working as you stated. It would help if stated what browser you built against, and what browser is causing problems.
  24. The directories would have to be owned by the apache process to lower the permissions. If you can't change the owner, a more secure way would be to store the directory outside of the DocumentRoot tree, and use PHP to read in the images. If you only have access through FTP, a quick google search for recursive chmod ftp client shows that FileZilla supports it. I don't have any experience with how well it works though.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.