Larry
Administrators-
Posts
5413 -
Joined
-
Last visited
-
Days Won
155
Everything posted by Larry
-
Okay, that's a big question. I'll look into it and see about writing a blog posting explaining how to use PayPal Website Payments Pro for the Coffee site example. Just so you're prepared, it'll probably take me some weeks to do all that. I'll post a link to it here once I've done it.
-
Thanks for the nice words. Much appreciated. I expect you have missed something or done something wrong, but couldn't say what it is with the information provided. For starters, how about telling us the versions of PHP and MySQL in use? And providing a URL that you're using.
-
Get_Password_Hash Problem
Larry replied to Brett's topic in Effortless E-Commerce with PHP and MySQL
Yes, that's what the binary data should look like. What you posted before is data in hexadecimal format. -
Excellent! Kudos for figuring that out and thanks for sharing so that others might benefit! Glad it's working for you now.
-
Well, I'm happy to try and help, but need specific questions to answer.
-
Well, first of all, the book doesn't do everything, so I expect the reader can take what's there, and add what you want to happen when an error occurs. But the other thing is that the try...catch can handle errors in any block of code. If you went if-else, you'd have to do that for every possible thing. Say you have a block of code that involves five steps. With if-else, you'll need to create if-else statements for each of the five steps. With try...catch, you can put all five steps within the try block and catch errors that occur in any of those five steps using the one catch statement.
-
Any Pagination Topic?
Larry replied to wheay's topic in PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
Thanks, Wheay, for the nice words on the book! -
Thanks, Gregory, for the feedback! Ironically, I did construction for years, as a part-time and summer job, from high school (two years of drywall) to college (pretty much everything) and for a while after. I miss the physicality and the immediacy of seeing results. On the other hand, I'm not completely exhausted at the end of the day. I know you're not doing the physical stuff, but I thought I'd share that coincidence. I think your idea of using IT to improve the industry is an excellent one. I hope you're able to do that and let us know if you have any questions along the way.
-
Not so sure about that conventional wisdom! As far as I'm concerned, anything that starts with "ALWAYS" isn't that wise. Some people prefer prepared statements and others don't. I would never say prepared statements are better than standard queries or vice versa. Each is better in some situations. Both are equally secure, in my opinion (if you take the right steps). Once you set aside the security question, I think of prepared statements as being better for situations where the same query is run multiple times in a script. That's why line 41 uses them for that query but line 23 uses a standard query (because there's no benefit gained by using a prepared statement).
-
Hello Paul, You need to get the value out of the function somehow. A function is a "black box": the code outside of the script can't see into it. So the function's return line is how the function returns a value. When the function is called, the returned value is assigned to $sum. Does that answer your question?
-
Web Hosting Recommendation
Larry replied to loie's topic in Effortless E-Commerce with PHP and MySQL
Thanks, Terry, for helping out. Excellent post! I have used GoDaddy on a personal project (not my choice), and while it's serviceable, I wouldn't choose GoDaddy. Avoid Dotster like the plague. They are the worst hosts I've had in 12 years of doing this. I would generally avoid any hosting company that does "hosting and..." or "...and hosting". Stick with a company that just does hosting. -
I can certainly try, but mostly it'll be me looking through the PayPal documentation to find you the answers.
-
Two Database Connections
Larry replied to gabian's topic in Effortless E-Commerce with PHP and MySQL
Thanks for the nice words on the book. Sometimes you can create two database connections by assigning them to two different variables. However, database connections are expensive, in terms of server resources, so I'd recommend finding a different way. For example, you can use one connection but switch databases as needed. -
Yes, that would suggest your rewrite rule is not working. But it's working for the shop/sales link, and it's working well enough to get to browse.php. It's the backreferences that aren't working. As Terry suggests, I would recommend going back to your hosting company. Because the rule itself is written correctly. Any hosting company worth their salt ought to be able to help some. And if they won't, what good will they be when a serious problem comes up? Well, that's not going to work because you've got no groupings in the match to use as the values for backreferencing in the redirect.
-
Sorry, I missed that you had said that in your earlier posts. Okay, going with your second site, which seems to be working better, the URL http://www.acmaine.com/browse.php?type=coffee&category=Dark+Roast&id=2 works fine, showing no products found. But if you go to http://www.acmaine.com/browse/coffee/Dark+Roast/2, which should work, you get the error. Now the browse.php script shows that error if this conditional is false: if (!$type || !$sp_type || !$sp_cat || !$category) { So what you should do is echo out the values of all those variables in order to see which one is the problem. Then you can debug from there. Thanks for the nice words on the books!
-
Login Script
Larry replied to muuucho's topic in PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
Yeah, if you want a long-term "remember me" feature, you have to use cookies. Sessions only last for a short time, by default. -
Are you certain that you're allowed to do .htaccess on both sites?