Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You need to check your queries succeed before using there results. At minimum.... if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { echo "<ol>\n"; while ($row = mysql_fetch_assoc($result)) { echo "<li> {$row['artist']} - <a href='{$row['songID']}'>{$row['title']}</a> ({$row['count_requested']} ) </li>\n"; } echo "</ol>\n"; } else { // no results found, handle error. } else { // query failed, handle error. trigger_error(mysql_error()); } ?> always.
  2. Actually, your calling.... or die("Query error: ". mysql_error()); which should show you the data you need. I'm not sure if the code you have posted is actually the code causing the problem now.
  3. The html document containing the iframe code goes on the server without php. You then use.... <iframe src="http://phpenabledserver.com/smallcal.php"></iframe> To include the php script into that page. Like I said however, there is no guarantee it will work as expected because the php will be parsed on the remote (php enabled) server then it will serv the html to the frame.
  4. Those errors simply mean your query failed and you have done nothing to catch the error. Take look at mysql_error to see what the actual error is then try and fix it.
  5. Your iframe's src attribute would need to point to a server running php. Even then, its not guaranteed to work because it will actually be executing on the other server. In short, without having php installed, you cannot run php scripts.
  6. It would be much simpler to use an actual database.
  7. You could place it within a frame.
  8. Or better still.... function asterix($string) { return str_repeat("*", strlen($string)); }
  9. Your using it within a print statement yet your function itself prints. make your function return your value instead. It can also be written a little better. function asterix($string) { return str_pad('', strlen($string), '*'); }
  10. I'm not sure where you live but kids work at McDonalds are payed more where I'm from. I'm not sure what my hourly rate is exactly because I'm on a salary but there wouldn't be anyone in this room on less than $40/hr.
  11. if(isset($_GET['id'])); should be.... if(isset($_GET['id'])): Or even better. Stick to braces {} like the rest of the php world.
  12. Variables are not interpolated within single quotes.
  13. $retval = $session->login($_POST['user'], md5($_POST['pass']), isset($_POST['remember']));
  14. If your already a programmer, the manual should be sufficient enough.
  15. Sorry, its the Hudzilla link.
  16. You need to learn the language first, before you start attempting to write any applications. There’s a good free book in my signature that if read from start to finish should probably provide you with a good base.
  17. I assume by 'webuser' you mean a user on the system that has the ability to write to the http server's document root. I would add them to the Apache group.
  18. grep ^User /etc/httpd/conf/httpd.conf grep ^Group /etc/httpd/conf/httpd.conf
  19. That is a php error and I suspect it is occurring prior to the code you have posted.
  20. Take a look at some case studies. http://dev.mysql.com/why-mysql/case-studies/
  21. += is a math operator, you should be using .= to concatenate strings together.
  22. On that web site. And that makes sense, because its a web site related to web development and FF has better tools available.
×
×
  • 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.