Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. $output .= outputModule($courseId, $courseName); Still appearing in your code.
  2. What are you talking about? you fixed the function so it's being called properly and you're still getting the undefined variable error? On what line?
  3. Two lines from your code: function outputModule($courseId, $courseName, $moduleId, $moduleName, $sessionData) $output .= outputModule($moduleId, $moduleName, $sessionsAry); What's wrong there?
  4. Tables are stored with a particular storage engine. The two most popular are InnoDB and MyISAM. InnoDB doesn't support fulltext searching. The index has to be on the column you're searching, yes. You have multiple tables all storing the same data? Why? Or are you saying that there are multiple sets of data that all reference a single "file" table? If that's the case, that's good.
  5. foreach($_POST['location'] as $value){ That implies that your $_POST['location'] is an array, but later you try to use it as a string. Perhaps you meant to use $value directly?
  6. You can set the locale of your PHP scripts.
  7. Much like with modern DRM, you're going to do nothing but annoy your paying customers and the pirates will gleefully bypass your irritant. Either do security properly or don't do it at all. "I want my site to be annoying to use" is never a good business model.
  8. Putting a match/against condition in your WHERE clause automatically sorts the results by relevance, and therefore you don't need the score (nobody displays it anymore anyway). Also, your query is wrong because there's no comma after ID, but again I'm recommending cutting out the whole first match/against clause anyway. You need this table to be MyISAM type (others are supported however), and you need a FULLTEXT index on this column. You also need to put your search modifiers (IN BOOLEAN MODE and/or WITH QUERY EXPANSION) into your WHERE, not your SELECT. Final note: Your table needs to have the ID plus the foreign table name. What happens when there's 3 entries for ID 2? Which table do they reference?
  9. the else will execute if the first IF is false...so the else will execute if $_POST['submit'] is empty. Visit the page directly so $_pOST is empty. Also, when I said to indent your code I wasn't asking for ME. Indenting your code is good practice. You'll never be able to figure out problems like this if you have 11 control structures grouped together with multiple ending braces per line.
  10. Indent your code properly so you can tell which block goes where. It seems to me that your else() is linked to your first if() for $_POST
  11. Exactly. What causes the download link to display? Whatever that is, stop doing that after the first time. We can't see your code.
  12. With the word "view" coming up multiple times, it's safe to assume he wants something graphical. Also, he wants a native client running on his PC. Either way, no sense in arguing about it.
  13. This has nothing to do with anything in this thread mysql -u root myDatabase That is the MySQL command line. PuTtY has nothing to do with it. It's like saying "what text editor do you guys use, vi or emacs?" and having someone answer "putty." Putty is a tool that allows you to ssh to a command line. That's its only purpose. The commands you have access to once you're inside another system aren't related to putty at all. Also, the mysql command line is not a MySQL gui.
  14. This has nothing to do with anything in this thread
  15. MySQL workbench is just fine. Most of us don't use stand-alone gui tools, or we use the ones built into our pricey development environments. My favorite is Navicat ($100), but the one built into ZDE ($300) is nice too. Otherwise, Workbend or phpMyAdmin should be enough.
  16. You should already know how to balance chemical equations on paper. Doing the same thing in PHP would not be difficult. You don't seem to have a good grasp of what a programming language is capable of. There is not, to my knowledge, a PHP script you can just stick a chemical equation into and expect it to give you the results. You could certainly write one, but start small first.
  17. Call your ISP and complain. Find a copy of the contract you signed when you started up, it should have a speed advertised there. -Dan
  18. Please specify what you mean by "within." Which of these words is not "within" a tag: WordA <a href="http://www.wordb.com" class="wordc">WordD</a> If your answer is "wordA and wordD," then remove the tags with strip_tags, emulate the same functionality with the preg_replace /\[[^\]]+\]/, and continue with your matching. If your answer is "wordA only" you're going to have a lot more trouble. It's going to be extremely difficult, especially when you start doing nested tags or erroneous HTML. -Dan
  19. Works for me on Chromium on linux. Please point out to your client that "broken" is a bit too vague to be of any help. For all you know those computers have toolbars installed that stop them from rending facebook, so your site is simply a side-effect. -Dan
  20. String syntax includes the answer you need, plus more.
  21. That function doesn't return any data. If you'd like to use the return value of a function...return something. Also, stop printing things if you want to put them in a variable. You've taken a function that prints information and attempted to print it again when you're trying to assign it.
  22. You've done...nothing here. What do you know about regex? You should be able to do this with relatively simple regular expressions. There aren't really any pre-made scripts for screen scraping. Also, it's probably illegal to scrape the Journal.
  23. Don't delete the whole folder, that's obviously not what you need. Your code seems fine, but you should probably delete the item AFTER you delete the images. That's just me being a paranoid programmer, but I never delete the parent before I delete the children. -Dan
  24. Note that you spelled "address" wrong in your thread title. Note also that you spelled "msg" wrong in your code. Programming takes an enormous amount of precision. if you're off by one letter, like you are here, nothing will work. Make sure you are more careful.
  25. Spike, a number of things: 1) "Query was empty" means your query was empty. That is 100% try and you can't just say "I don't think so," that's what the message says, that's what the message means. Nothing in your current code seems to be able to cause that particular error (though I didn't read it all), but it IS an error and it IS caused by an empty query. 2) You've mentioned sessions in this thread a couple times but nobody has yet mentioned that sessions are domain-specific. Your cookies (including the session management cookie) will not transfer to the new domain.
×
×
  • 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.