Jump to content
Larry Ullman's Book Forums

deanstonehocker

Members
  • Posts

    4
  • Joined

  • Last visited

  • Days Won

    1

deanstonehocker last won the day on April 27 2014

deanstonehocker had the most liked content!

deanstonehocker's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. I've just finished the first part of a website built for a non-profit organization to which I belong. Talk about a journey! I've spent hours and hours, as folks say pulling my hair out, trying to figure out why something isn't working. I finally give up and go to bed, and then wham . . . I suddenly think of something I hadn't tried, and I climb out from underneath the blankets and sure enough, there was something wrong--usually a stupid typo--in the code that caused the problem. As soon as I see it's working, it's like I'm on top of the world, and all of the frustration and confusion is worth every minute for that high! I think I'm addicted! I've worked through this book and Larry's first book on PHP three times now. Every time I work through them I learn more. I don't know how I missed some of the stuff I missed, but there you are! I never use the files he provides, I always type them myself, and that's probably why I have so much trouble. But it forces me to look more carefully at the code, and to try to understand it more thoroughtly, I think. I worked for a PHD Stanford graduate in California for awhile, and he made us write programs in comments before we added code. I think that's a good way to see if you have what you need to pull it off. The truth, he used to say, is in the algorithms. I bought one none-Larry book, David Powers' PHP Solutions, and it doesn't come close to being as good as Larry's. My next project is to get Larry's advanced PHP book, and I bet I'll work through that five or six times. I still have sections to add to my non-profit's website, but I'm so happy that I got it up and off the ground. I'm sure you old pros know 100 times more than I do, but I have to say that given how quickly things change in the field, you'd be crazy to consider yourself done with the learning. What in the dickins is yii? I'll just have to find out. One final thought for someone who might be feeling discouraged as I was a few weeks ago. I couldn't get the registration system to work for my non-profit's website. I chose iPage for my hosting company because, frankly, they were the cheapest I could find. Well, I'm sure it's true that you get what you pay for, but it has worked out OK for me. I could not get sessions to work, and I went to the iPage knowledge base and searched for sessions, and discovered that I had to modify the PHP.INI file ON THE SERVER. Yikes! The path I discovered I needed to enter was goobledegook times ten. But I struggled through, and I got it done. And when I was able to access the session data I felt like a million bucks. Larry, for an English major, is fantastic at helping people through this maze. He is the man.
  2. I used Notepad++ to select and copy the chapter five INSERT INTO entry from your sql.sql file. But I can't find a way to paste the data into the mysql client window so I can populate the users' table of the sitename database. Control V just does ^V. There are no menus in the command window so I can't choose edit, paste. I'm just trying to avoid having to type all of that in. This is my second LU book, and I think they're very good.
  3. Somewhere in his book, Larry suggests going away from your problem for a day or two, and then coming back to it with a fresh mind. I've done just that, and this morning I read through the database chapter again. For the first time, I realized that the strip slashes() function had been applied to the form fields when the insert data query was run. I had been trying to use these functions for the retrieve data (view_entries.php), and that is apparently why I couldn't get rid of the slashes. Once I added my_sql_escape_string(), stripslashes(), trim(), and strip_tags() to the add_entry.php script, the slashes were gone when I viewed all of the entries in view_entries.php. I must say that I have worked from a dozen different computer books, and Larry's has been the best of them all. I don't believe there has been a mistake in any of his example code. That's really pretty rare. As for GoDaddy, I agree that there must be better hosting companies. However, I was asked to take over the website of a non-profit organization, and there is still a year and one-half to go on their contract with GoDaddy. So . . . (I notice that the PHP website has a link to hosting companies they recommend.) Thanks for your suggestions and help.
  4. In the section, Securing Query Data, the use of stripslashes is given. It works when only one blog entry is being displayed. However, when several blog entries are being displayed using the mysql_fetch_array() on page 361-365 of the book, I can't elimate the slashes that are placed in front of single and double quotes from the database fields 'title' and 'entry'. I'm using PHP version 5.2.17. I'd like to turn magic quotes off, if that's what's causing the problem. GoDaddy's PHP Info indicates the following regarding Magic Quotes (the two columns on the right represent local value, master value): Local Master magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off I can't find a help topic on GoDaddy about turning magic quotes off. Maybe they recognize that having them turned off threatens their servers? Anyway, I suspect the problem is that the variable being stripped in the security section of PHP for the Web isn't an array, and the fetch array, of course, is. I've tried placing the "stripslashes()" function in every possible position in Script 12.7, but nothing seems to work. Any suggestions?
×
×
  • Create New...