Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Posts

    5413
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by Larry

  1. I don't think hiring someone to help in the forums would really work, but thanks for the suggestion.
  2. Per the forum rules, never, ever post a message like this last one. If your post doesn't ADD anything to the conversation, it shouldn't be made. As for your problem, the issue is that you've installed the site in a subdirectory of your server: ex1/html. The .htaccess folder must go in that html folder. And your links need to be changed to /ex1/html/whatever. You'll also need to do that with your images and CSS and such as well.
  3. Thanks for the nice words on the book. It is appreciated. What you're asking about is a good question, as it's common enough, but is complicated. The trick as I stress in the book is that you need unique identifiers to set prices and quantities and orders and such. But you also need to be able to easily reflect available colors, sizes, and so forth. There are a couple of ways of going about it and how you approach it depends upon all of the details of your particular site. If you're just selling shirts, it's a bit easier... Start with a sizes table (size_id, size), a colors table (color_id, color), and a general_shirts table (name, description, other generic information). Then you'd create a specific_shirts table: specific_shirt_id, general_shirt_id, size_id, color_id, price, quantity. That gets you what you need. If the structure looks familiar, that's because it's essentially the same thing that the book does with variations on coffee.
  4. I could answer your question better if I saw the actual code you're using. Also, for future reference, it's generally nice to share the solution when you have one. As for the delimiter, the pipe (|) is a pretty good choice, or a tab, or a comma and you'd just need to quote all strings in case they have commas within them.
  5. The problem is most likely because your URL has index.php followed by %3F, whereas that should be a question mark.
  6. Well, Facebook in particular requires HTML, CSS, and JavaScript for the client-side of things, not counting graphics work. I believe Facebook uses PHP for the server-side, although it's possible they use more than one language. In general, common server-side languages include Python, Ruby, and Java. You'll also need to understand SQL, the language used to communicate with a database application, and you'll need to learn the fundamentals of the database application itself (such as MySQL or I believe Facebook uses Cassandra). Also, with the demands of a site like Facebook in particular, there is plenty to learn in terms of managing a server, DNS, CDNs, database replication, and so forth. Facebook is a really high standard, so do understand that using Facebook as a model or goal is a target akin to you or I trying to land a spaceship on the moon. I would focus on your more immediate, practical goals, and also divide up the tasks based upon your abilities and skills (e.g., learn front-end or back-end development, not both).
  7. I'm sorry for not replying myself earlier; slipped through the cracks. The thing about a VPS is that you can install whatever you want, and ServInt provides amazing support. But your fears are warranted: you'll need to learn a bit and pay attention. I've not kept up with server security nearly as much as I should (it's on my ongoing to-do list). But the flexibility is nice. So you'll need to think about how much work you want to put in and weigh that against the freedom. But if you do do VPS, ServInt is highly recommended!
  8. As I wrote in response to your other post, HartleySan, I don't believe in making sites that won't work on browsers, even though the idea of having to support IE6 is criminal. That being said, this forum software is a commercial product that I've purchased and installed. Perhaps I could start mucking around in its internals to change its behavior (like this issue you're having, or your request that it not automatically capitalize the first letter of each word in the subject, or your request that it allow you to use the letter b as a variable), but I'm really never going to. It's unfortunate that you're having this problem, but I have a very limited amount of time (specifically, about 20% less time than I need), and have to prioritize accordingly. I still need to update the look of the updated site so that it ties in with my main site (e.g., actually use my icons and link to the book pages)! And, of course, I need to do the work that actually makes me money...
  9. For starters, in your action, you have javascrip without the "t". Even with that corrected, I suspect that if you look at your HTML source code, you'll see no value there, as you'll need to have JavaScript write the value of the variable there. But if you're doing that, I'd have JavaScript create the value as a hidden form input. It'd be much cleaner that way.
  10. Thanks for the nice words. It is appreciated. If it's any consolation, what you're trying to do is a little tricky. The most efficient way to do this would be to read the file line by line, using fgets() in a loop: while ($row = fgets($fp)) {... Then, within the while loop, you'd explode() $row and compare the record to the one you're looking for. You can combine those steps by using fgetscsv(), which reads in a row and turns it into an array: while ($row = fgetscsv($fp, 1000, '#')) { The 1000 value needs to be longer (in characters) than the longest line to read in the entire line at a time. The third argument is the delimiter (what breaks up items in a row), but it can only be a single character. Within the loop, you'd compare $row[0] to whatever to see if that's the correct record. If so, you'd do break to exit the loop and terminate looking through the file. So the basic premise is: while ($row = fgetscsv($fp, 1000, '#')) { if ($row[0]==$somevar) { break; } }
  11. Larry

    Forum Update

    Get a real browser. Seriously, IE6? IE6 was never a good browser and it's YEARS old now. I do believe Web sites should be inclusive, not exclusive, but IE6... As a Web developer, you shouldn't even be using IE at all!
  12. Thank you, HartleySan, for your apology and this post. I very much appreciate it as I did not care for how this thread went. And, I will add, that there are almost always multiple ways to solve a problem. And it's not always the case that some of those solutions are clearly and universally better than others.
  13. What do you mean you "tried" the stored procedure? Do you mean you tried to create it or tried to execute it? Also, please do me a favor and drop the "I look forward to hearing from you soon."
  14. Yes, that's correct. Do that. I must have misremembered it. Please let us know if that works for you.
  15. Adding to what Chop said, I agree that doing research is important and can be billed to the client. I think this is another place where it's best to break the contract into pieces and to charge different rates for different things. I recently spoke with a local design team about creating a logo and business card for me. Their quote was $6,000 or $10,000 depending upon how much research they did. In no way was I going to spend anything close to that regardless, but I will say that although I see the benefits of research, it bothered me that they'd charge $185/hour (or thereabouts) for research. Similarly, if a project involves some data entry, I normally quote that at a lower rate. You should try to get a decent chunk of money early, but you have to be careful as that can scare customers off. You can also make the last payment relatively small, so you have most of the money even if the client doesn't pay the total amount. Or you could really protect yourself and create the site on your own server so that the client has nothing they can steal (backend-wise), should they bail. As for hosting, I've managed my client's hosting in the past and thought it was so smart of me and then grew to regret it. I think I had one client paying me $200/year to host the site, which covered my entire hosting costs for all my sites. Great, right? But if you're providing hosting then you need to do backups and manage security and really be available 24-7 if there's a problem. It's a lot of work that really only plays off if you're doing it for lots of sites. Also, in my experience, when I had problems with my server, that meant my own sites were down as were my clients, which was a double whammy. As you can tell, I wouldn't do hosting for clients any more.
  16. This is a common, although not widely known, aspect of computers: they don't store numbers cleanly. For example, in many languages, this condition would be false: (1/3 * 3) == 1 So internally, PHP is adding those extra digits (or, to be precise, the computer's architecture is).
  17. To be clear, you're not trying to run that stored procedure but actually create it. And you don't say how you're trying to create it (i.e., using what interface), but if you're using phpMyAdmin, it has a checkbox for changing the delimiter, so that you don't use the delimiter line.
  18. I don't think it's a problem that the server says this. More importantly, there is no "best". It's a matter of what's appropriate to the situation. MD5 and SHA1 have been cracked, among others, but that doesn't mean they aren't still fine for some purposes. Others are perhaps uncrackable, but using them will slow down your site.
  19. Larry

    Forum Update

    Great. Thanks for the input!
  20. Larry

    Forum Update

    Thanks, Antonio, for the input. By "better than the last one", do you mean better than the one that matched my main site? If so, let me know what you didn't like, because otherwise my plan was to duplicate that effort!
  21. I normally break it into general categories. So HTML design, which I farm out, is X. Then I expect the database design to take me, say, 4 hours, at $Y/hour, that's $4Y. Then there's the programming of the site, which is the largest bulk and the hardest to estimate. I guess how many days it would take me, add a couple, and multiple this out against my hourly. Remember that it always takes longer than you expect. Then there's testing and tweaking. Plan on a couple of days of that. After I use the general categories to come up with a total, I might tweak the numbers a bit if they don't feel right. Generally speaking, I think that database design is about 5% of the cost, testing and tweaking is 10-15%, HTML design is 20-30%, and PHP programming is the majority. Keep in mind that an estimate isn't just how much the client is spending, but what they're getting. Showing that backend programming is the biggest expense conveys that the client won't see all the work that goes into it. But you ought to consider itemizing the "features" they'll be buying, in some detail: user registration, login, shopping cart, etc. These are things that are meaningful to the client and shows them they are getting a lot, not just a Web site. It also protects you from them later saying "I thought the site would...". And finally, as part of the "sales" aspect, you may want to put in some buzzwords about standards and security and the like.
  22. Jonathon's not far off, but my main reason was that a circle is a shape with an area and a perimeter but no sides.
  23. ALong with what Antonio suggested, you could check out how to store the first result set: http://php.net/manual/en/mysqli.store-result.php
  24. You don't actually need the curly brackets in the second example (when doing concatenation) and you don't need parentheses in the first. As for why this is a problem, I don't know: just the way PHP works, I guess.
×
×
  • Create New...