Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. //when game ends, send missed answers back to fill them in if (isset($_GET['endgame']) == "YES") { echo json_encode($_SESSION['missedanswers']); die(); } else { //do nothing and continue }
  2. Here... document.getElementById('missedanswers').innerHTML = "missedanswers"; Should be.... document.getElementById('missedanswers').innerHTML = missedanswers; However, missedanswers will now be a Json object which you can't just simply print.
  3. jQuery('img[class^="quick_quote"]').click(function() See http://api.jquery.com/category/selectors/
  4. Even if $_SESSION['missedanswers'] is an array, you cannot simply echo it. May I suggest using json_encode to change your php array in json which is easily understood by Javascript.
  5. glob is standard PHP, not part of any extension. This means that unless you have specifically gone out of your way to disable it, it will be enabled. It is enabled by default.
  6. You will need to print_r() the $_SERVER array and have a look, I0'm at home and am not sure of the key exactly. I have used similar mechanisms at work however. PS: This data is only passed when the clients are using IE also.
  7. You just posted a thread in the correct board for this question. Did you not see this sticky? This question has nothing to do with a PHP Coding problem.
  8. Ive not used Aptana but I'm sure its much the same. In Netbeans, you would need to add the Zend/library directory to the projects include path.
  9. Is this within an intranet environment? The data you seek should be within the $_SERVER array.
  10. What you have shown us is not xml, its a print_r of an SimpleXMLElement Object. It is quite simple to reference object properties using -> So that would be.... echo $xml->results->ship->cruiseline; echo $xml->results->ship->description;
  11. Ha, I'm on fire tonight. Missing stuff all over the place. Change.... <?php $query1 = mysql_query('SELECT * FROM users ORDER BY Username'); ?> to.... <?php $query1 = 'SELECT * FROM users ORDER BY Username'; ?>
  12. Can you send mail via outlook using this server config? I'm not sure this is actually a php problem, looks more likely to be a misconfigured mail server.
  13. These kinds of micro optimization are a waste of one massive resource, time.
  14. Check out the jQuery framework. It'll make your life alot easier. http://api.jquery.com/jQuery.ajax/
  15. You need to save your queries into a variable then echo them. The error is indicating that your are passing a resource into it somewhere. Again, none of the code you have posted would create that error.
  16. It's just my opinion, and it really is as simple as I don't like it. It lacks the tools that I have grown to love, in my point of view it's just not dev freindly. Everything in Linux is dev freindly. If theres something you don't like, you can fix it. It's allot more customizable. Hell, Iv'e been building my own distro for the last 2 years based on Linux From Scratch. As far as web development goes. Again, I don't think windows provides the environment (and I am forced to work in IIS all day). I understand completely about the job prospects however, and yeah, it's the same down here. There are heaps of .NET and PHP jobs. But there are also plenty of Python and Perl jobs. Your not going to need all the jobs available to actually find work. Freelancing, again, I just don't work for clients who are using Windows hosting. It's not worth my time. When I'm freelancing I at least want to enjoy what I'm doing.
  17. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321459.0
  18. That'll be it. I missed that all together. You can re-use variables you know, no real need for $result, $result1, $result2 etc etc.
  19. Your choice, but I'd prefer it if I never had to work with Windows again. That makes no sense. wamp is Windows, Apache, Mysql and PHP|Python|Perl
  20. You should always check your query succeeds and returns a result before attempting to use it. if ($result=mysql_query("select * from car")) { if (mysql_num_rows($result)) { while ($row=mysql_fetch_array($result)) { echo "<tr>"; echo "<td>".$row['ticket']."</td>"; echo "<td>".$row['carname']."</td>"; echo "</tr>"; } } else { // no results found. } } else { // query failed, handle error }
  21. Cookies are stored on the client.
  22. Niether of those queries could produce the error described. Is there more code?
  23. Well, it would allow an entire registration or login process to happen without ever reloading the page.
  24. That is a mysql error. It's refering to line 1 of your query. Can we see the other query and surrounding code?
  25. I would assume from the quotes that the author may be implying the use of Ajax and avoiding redirects almost all together.
×
×
  • 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.