Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Jonathon

  1. I would think that as long as you stop the potential to abuse bcc,cc ect you should be fine. Basically the scrubber in Larry's book. It would be hard to do anything else regarding the actual input in my opinion.
  2. I would think that it would be better to set a $_SESSION['valid_user'] = true on a correct login and query for the presence of the $_SESSION['valid_user'] rather than an actual plain text password, especially depending on your hosting, as shared hosts often write to a tmp folder accessible to all on that server.
  3. Right, I said I would provide some feedback on a couple of OOP books that Larry recommended to Wasabi (As you can all see). I had already looked at getting PHP Object-Orientated Solutions by David Powers and Matt Zandstra's PHP Objects, Patterns and Practice as they came very well recommended on Amazon. I should mention that I re-read (skim read) PHP5 Advanced. I did this for two reasons, firstly, I wanted to look at how Larry described and talked over the material, so I could go into this book, with a heads up (remember what I already knew and what i'd forgotten). Secondly, everybody learns and interprets differently so I didn't think it would hurt to have two explanations of any one topic. So far I am 50 pages into PHP Object-Orientated Solutions and it's been a good read. I picked up a couple a things, such as how the Zend coding standard looks (which isn't vastly differently to my own or yours I would imagine). A good tip (Tips are things that I'm a sucker for) was to use the underscore when declaring private/protected properties. This helps to remind you that it is protected. protected $_var; On a whole, I would say that it isn't (by a whisker) quite as well explained as PHP5 Advanced, there are occasions when I question if i'd be as understanding about an area if I hadn't read Larry's book. The book goes into the DateTime class, which from memory I think Larry said is going into his new PHP and MYSQL book. Validating users which is based on the Facade pattern, building a versatile remote file connector, simpleXML, Looping with SPL, Generating XML from a DB & creating your own RSS feed. Most of which you'll find are in Larry's advanced book but a procedural approach. I shall report back as I go through it. I'm not sure how regularly Wasabi visits, but at least Antonio and Larry wanted to know.
  4. Yep, if you select the poems table and then go to insert and put all your information about the poems.
  5. Yeah, let us know what you find out. I've never had any problems or heard of any. If there is or was a problem, you'd imagine it to have been rectified because sending emails is paramount. Good luck
  6. I've never had any problems sending to hotmail or Gmail and I did do a lot of live testing to those accounts a couple years back. Sorry I don't know any other mail functions, except Zend's. But that would be PHP (I imagine). What sort of problems do you have? Just that they don't get delievered?
  7. I'm not sure 100% of your problem, are you aware of the $_SERVER array in php which can return the kind of information you said you were after?
  8. This is the link to the PDF which explains it all - it's pretty straight forward, but if you have any problems or anything else I'm sure someone (if not me) will be available to help you Bonus
  9. This is the path to the Zend Library. The framework i think has a library folder called `library` and this is the path your setting to call the zend folder (which is inside the library folder). I think you possibly haven't seen the E-commerce extras, whcih are PDF's explaining to download the zend library. Let me know, and i'll try take it from there for you
  10. That's quite alright there are many people who can and will offer you help here, including Larry himself. MySQL opens up a whole new dimension to your programming, I don't know what is in the book you have as I don't have it, but if you enjoyed it and wanted to learn some more then there is a new PHP and MYSQL book coming out soon. Anyway, good luck
  11. Well Looking at Antonio's post i would guess he suggested having a second table with category_id and category_name. I would therefore surmise that the idea was to use category_id = 1 where category_name = a, then category_id = 2 where category_name = b. (At a guess). To start this process it is much like you did before. You do not need to make an new database, you can use your existing database and then add a new table called `whatever you want, maybe categories or something`. add 2 columns for this new table call one `category_id` and select it as an integer, tick auto increment as before, give it a length of 3 and select primary key then the next column, `category_name` and select it as a VARCHAR, if you only want to store them alphabetically you only need a length of one. That's it really. Then you need to go to the insert tab, and insert the individual letters into the db in the category_name field, the category_id should automatically insert itself. That table is then finished. Just looking back at Antonio's structure, there doesn't seem to be a place to store the actual poem prose? Would you agree with this? If so you need to select the tuxandp1_poems table and click the structure tab and it should say under the table layout, Add 1 field to... and some options like 'at the end of the table'. Add 1 field to the end of the table. From there call the field 'poem' or something applicable. And set the table type as TEXT. Then save. You can then add your poems text, poems title and the category it belongs to (i.e 1 if the poem falls under the 'A' category) by using the insert tab when you're viewing the poems table. The id should again increment on it's own. Shout me, if there's any problems
  12. PhpMyAdmin has a really simple inmterface to use. If you go into it you will first need to name your database. Then from there name your table as Antonio has said `poems` and select 3 columns. Then it will pop up with what to call your columns. So 'id' will need a column type INT (for integer) this is available from a drop down, you also need to tick the auto_increment box and on the `index` section select primary key name column 2 `title` and select the column type VARCHAR and the length as 255 column 3 - name `category_id` table type INT and length of 3 Press Save (i think) - It should be fine then the table should be created, PhpMyAdmin will then print out what the full query was, you can copy it, if you want to and paste it back to see that it worked ok. I really think you'll love using MySQL and PHPMyAdmin. Let me know how you get on
  13. I understand roughly what your saying. But this may be easier to see your code (for me that is, it's late) But to answer your question I would imagine that you would have to store it in a session if you are using the same page to validate the user's response. I did something similar with a captcha I wrote.
  14. Sorry, if you have ssl installed I guess you're working on a live server.
  15. A quick guess, have you got SSL enabled in Xampp?
  16. Thanks for getting back to me Larry. I'll look into it, I'm quite interested in those sort of topics anyway so I'd read it out of intrigue and if it does aid in programming too then that's a double bonus. Thanks Jonathon
  17. What code are you using in your Thanks.php page Chris? Your config page should be fine as I imagine you will have mirrored Larry's.
  18. Dunno I guess it's about thinking about problems and solutions. Larry mentioned he spent 2 years studying it and put his prowess down to that. So it seemed a good thing to try and learn about. But If you don't really know what it is, it's a bit hard to know that what your looking at is relevant. Think some people call it first order logic too. But I'm not sure
  19. Would anyone know of any decent online sources for symbolic logic in respect to programming? Thanks
  20. I'm not doubting you, I just feel like i've seen something similar somewhere. But I couldn't tell you where, when, what the problem was at all i'm afraid.
  21. :/ This is strange, but I have no idea why i think this. But something (quite possibly / probably wrong) wants to say that you can't update MySQL using the for loop like this. I have no idea why I think this :/ (Which I realise is of little help to you - sorry )
  22. And do all your values turn out ok if you echo them out in the script? (Although i'm sure with your knowledge of programming, you've already tried this)
  23. So it works if you just type the SQL into PHPMyAdmin? But it doesn't work in the actual script? I'd have to guess that the (int) is maybe failing it that regard. What happens if you use braces here. If that is where it fails. (int) {$_POST[goal][$i][goal_id]}
  24. Good luck, if you have any problems then there's always some one around to help.
×
×
  • Create New...