Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Posts

    5413
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by Larry

  1. How about reading the forum guidelines to see what kind of information might be required here? You've not been good about abiding by the forum guidelines before, which is why I'm giving you a particular hard time with this. But if you look at your question, you should be able to think of what other information someone would be needed in order to answer your question. As a contrary example, what if I were to pose this question to you: what windshield wipers do I need for my car?
  2. What do you mean by you "checked them and they were both right"? The MySQL root user is just "root".
  3. Yes, exactly, although you'll also have to drop the use of 'HTTP://'. As a rule of thumb, including or generally dealing with files on the server in PHP should be done via the filesystem. Including or referencing files and folders on the server using HTML, CSS, and JavaScript should be done using HTTP (implicitly or overtly).
  4. Thanks for the nice words and for the interest in the books. Much appreciated. When you say it "doesn't work", what does that mean? It doesn't return any results? Are there any distances that are less than 1 when you run the query without the WHERE clause?
  5. You can leave the .htaccess file in that folder, but I would recommend adding the RewriteBase directive, after turning on the engine, to acknowledge all the subdirectories.
  6. Your phpinfo() output indicates the active PHP configuration file. That's the one that needs to be edited. As for your access denied message, that means your root-user password is incorrect.
  7. This particular problem has nothing to do with absolute and relative paths but is actually caused by the fact that you're trying to include something in PHP via http. Use HTTP for Web stuff, use the file system for PHP includes. And I'm actually recording a screencast now, to be published as part of the PHP and MySQL book, that explains absolute and relative paths in detail.
  8. Of course I do! How rude it'd be to send someone grass and newspaper clippings when they were expecting a book and not sign them!
  9. You can do exactly that. You just need to do it once for every record returned. So use a while loop, fetch the array into $row, then, within the loop, do $some_array[] = $row;
  10. Hey Lou. Thanks for the nice words on the book. Much appreciated. Jonathon is correct: you could not use one language to connect and another language to interact. That's because the connection is represented by a variable type particular to the language. And I wouldn’t see any benefits in mixing languages like that anyway.
  11. What folder is your .htaccess file in? Is it the C:\xampp\htdocs\website folder?
  12. The truth is that I write as if I'm very generous with my books, but no one ever actually receives one. I send people bound up newspaper clippings and grass instead.
  13. There's no better or easier way as far as I know. And the counter variable is not necessary.
  14. In this particular case, the fact that print returns 1 is meaningless. Or not meaningless, but not useful. What print does is output a string, but the function returns the integer 1. Normally the returned value is not used, but you could do this: if (print('Hello, world')) { ... That's how you might otherwise use a function that returns a "true" value. In this case, there's no need to ever do that because print always returns 1. Still, I use print() as an easy first example, because it's easy to understand what the function does and its definition.
  15. You should confirm that .htaccess files are allowed in your configuration, which is to say that there's an allow override directive for that directory in your httpd.conf file.
  16. I think I've given Jonathon a free book or two, although I could be mistaken. I certainly appreciate the help that he and others provide here!
  17. Items are stored in $_SESSION['cart'], with each item being a single element in that array. To get the number of items, you could use count($_SESSION['cart']). However, that wouldn't reflect if there were multiple copies of an item in the cart. To get that, you'd need to loop through the $_SESSION['cart'] array and add up all the individual items.
  18. That means there is no column named admission_status in the inpx_admission table.
  19. Thanks for sharing the solution. I would recommend, however, that if the $expri is coming from the database, that all of the calculation takes place there, too. You can floor the results in SQL.
  20. Hey Larry, Thanks for the reminder. Yes, it is, but there are still other (paying) priorities. I've been trying to finish up the PHP and MySQL book, which I almost have. Now I'm doing the videos that go with that, while doing research for the JavaScript book. Then I have to start writing that. So I do intend to write a tutorial on PayPal Website Payments Pro, but it's a lot of work (researching, writing the code, testing the code, and writing up the results). So, still on my radar, but because it's a bigger task, it gets pushed back more easily.
  21. Depending upon many factors, you may or may not be able to test credit card transactions using your own computer. But if you're trying to develop on that level, you may want to change hosting. Or not use stored procedures. I hear good things about DreamHost.
  22. Thanks for your question. If I recall correctly, yes, the first project does allow you to log in without having paid. But, most importantly, you can't view content without having paid (actually, without having an active account). Not only is this not a problem, but it's actually ideal, as it encourages people to pay (they can get in and get a sense of what's there) and encourages people to renew. For example, after paying once, the user's account is valid for a year. After that point, they need to renew. But they can come back in 13 months and then renew. In my opinion, outright blocking people from logging in until they've paid will hinder sales.
×
×
  • Create New...