Larry
Administrators-
Posts
5413 -
Joined
-
Last visited
-
Days Won
155
Everything posted by Larry
-
Second Site: Absolute References
Larry replied to Magnus's topic in Effortless E-Commerce with PHP and MySQL
Where are you placing your site files and what URL are you using? -
If you use a browser which allows you to dynamically resize the textarea (I used Safari), you'll see that it's an issue with the width of the textarea. Has nothing to do with the JavaScript.
-
You're quite welcome. As for what you're experiencing, this is how MySQL behaves: if you run an UPDATE query that works (i.e., executes without error) without actually changing any values, then the number of affected rows is 0. If your PHP scripts just checks the number of affected rows, it'll seem like there was a problem when there wasn't. The alternative is just to check that the query ran without error.
-
I think the problem is due to the width of the textarea. If I shrink the width, the cursor moves to where it should be.
-
Problems With Ipn Script
Larry replied to MrJames's topic in Effortless E-Commerce with PHP and MySQL
Hello James. I'm not saying you're wrong, because you've seen what you think you've seen, but based upon what I know, it makes no sense at all that query errors in a PHP script would case a 500 error. In 12 years of PHP development, I've never seen a problem with a PHP script's queries causing a 500 error. -
Problems With Ipn Script
Larry replied to MrJames's topic in Effortless E-Commerce with PHP and MySQL
I think you're overcomplicating this. As Abigail said, you need to be able to access www.example.com/ipn.php (or whatever the correct path and filename are) directly in your browser. This is the same as if it were any other PHP script. Understand what the proper URL is first, make sure that loads without error, then make sure PayPal has that proper URL. -
And I appreciate you attempting to provide all the information; much better to provide too much than not enough, but this is a bit ridiculous. Try to post the pertinent information in the future, please, not the entire debugging output. There's a point where so much information becomes unusable.
-
So your $stmt variable probably has a FALSE value, meaning that mysqli_prepare() failed. This is either because there's a problem with your connection or with the query. I don't know that this would cause the problem, but I'd start by removing the extraneous spaces you have in the query string. You can then include code that checks $stmt and if it has a false value, you call the mysqli_error() function.
-
Uploading Pictures- Organization
Larry replied to Steve's topic in PHP for the Web: Visual QuickStart Guide (4th Edition)
Good question. I would come up with an organization scheme now that is viable for the long term and you're right that putting al of the images in two directories will eventually become a problem. -
I wouldn't take how long it took to receive this email as any sense of things. There are too many considerations there. If I were you, I might be inclined to get UK hosting, but I wouldn't be bound to it.
-
Geoip With Pear
Larry replied to Jonathon's topic in PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
I'll look into this and see what I can figure out. -
Lou, thanks for the nice words on my books and for your interest in them. It is appreciated. As for your situation, I don't have much to offer, as everyone learns and works differently. I can say that you may benefit from starting off smaller and working your way up to your end goal. Even 12 years into my career, with each project I learn something new and hopefully do the whole project in a better way. Reading as much as you can is great, but that can also confuse you, as different writers/programmers have different methods and approaches. At the end of the day, you need to sit down and your computer and do it yourself. I don't know if you're subscribed to my newsletter or not, but you may appreciate this article from earlier this year: http://www.larryullman.com/2011/02/01/what-is-larry-thinking-36-becoming-a-better-programmer-and-more/#thinking And, yes, my degree is in English. I have no formal computer training save for one Pascal class in 1989. That actually goes towards my work as a writer, though. I credit my programming abilities to two years spent working with symbolic logic. For about 95% of the cases, solving problems and working things out is far less complicated and intuitive than I believe people think it is. The same goes for learning new technologies or languages: there's a difference between OOP and procedural programming, but procedural PHP is similar enough to procedural C and OOP Ruby is similar enough to OOP PHP. Once you grasp theories, the rest is just syntax.
-
That's good information to know, then: the kind of information you should include when you're asking for help. You should also read the forum guidelines before posting again, so you can see what other information would be very beneficial to those of us trying to assist. But what you're saying doesn't make sense. You're printing out the exact query being run by your PHP script, with the values in it? And you run this exact query in the mysql client and it works?
-
You're quite welcome. As for an example, the code would just be something along the lines of if (!headers_sent()) { header(...); } else { print 'Would have sent a header but I could not.'; } In a live site with things working as they should, you should have already worked out all the headers already sent issues. Sometimes, when developing something, you may appreciate using code like this to avoid getting secondary, confusing errors. For example, a script does X and then redirects the browser. If the script has an error before the header call, then you'll see the error and the headers already sent error, which can be confusing to some. So you could use that code to prevent that from happening. Using code like the above isn't obligatory, in the sense that I don't use it commonly, but it has it's merits.
-
Chapter 9 Creating Cookies P247
Larry replied to neophyte's topic in PHP for the Web: Visual QuickStart Guide (3rd Edition)
I forget whether I explicitly say this in the book or not (I believe I do), but some browsers, and by some I think I just mean IE, won't prompt for cookies when running sites on localhost. This is in a tip, I believe. -
Thanks for the interest in the books. As for the text color in DW, I have to say that's not really significant. As for the images issue, I expect your paths are incorrect or something. I don't use DW, so I couldn't say.