Jump to content
Larry Ullman's Book Forums

Jonathon

Members
  • Posts

    1064
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Jonathon

  1. Thanks to Larry and HartlySan for your responses. Its cleared some things up for me. Because I as I mentioned I wasn't sure of its place in the market really. Learning learning learning (It never stops! All in the aid to keeping up and improving) Thanks
  2. Yeah Web wise I'd agree and Flex does seem like a good idea. We recently had a discussion about time and trying to keep up withe pace that the web moves at. But I'm slowly begining to see what Flex could be used for here, which is good. I've got quite a few more things I want to be more efficent with. But as I investigate Flex I can see how it could open up a whole new plethora of options and routes for me (Time permitting though, I can't stress time permitting enough) Thanks as ever HartleySan
  3. Yeah essentially that's it. You can always validate the $_GET['sku'] checking it's an integer maybe? so if(isset($_GET['sku']) && is_numeric($_GET['sku'])) { // Do something } also do you need to SELECT everything from the database? You can just: SELECT column, column2 FROM table WHERE sku=$_GET['sku'] But yeah well done
  4. To expand on the latter part. The filter extension is fairly new to PHP and is used to validate ir santize various input forms. Such as emails, integers, floats etc. Here is a link for the section on the manual, it gives you all the different types availabe. Worth a quick squiz. (colloquial for look where I live) PHP Filter
  5. Hi HartleySan, Not a problem at all friend, I'm more than happy for anyone who has some kind of knowledge about Flex to jump into this topic. I just wasn't sure who definitely would have some knowledge in the area bar Larry. I've never really understood how Flex, Flash, AIR all fit together and what there roles are. But it wasn't until the other day I wondered what the advantages were to using it rather than say building a local system that runs of some PHP, JS and MYSQL.. This intrigued me to ask for peoples experiences and views, because you can't always tell from reading a product description how useful it will neccessarily be for you. Thanks for the reply i'll look into it a bit more too
  6. ni Preston, Yeah that's it You seem to have got understood what it's used for so i'm glad. Anything else then please pop back and some one will be able to help you out
  7. Hi Larry, I was chatting to a guy the other day and he builds websites but also systems. Things such as a HR system or other things like that for companies. I enquired about what language he writes them in and he was a few different things. I've done Java, C, but the last one i've done is a PHP and MYSQL one. Which lead me down to a thought that hadn't previously occured to me. That thought was that I in my head have been a bit narrow minded and just purely thought as projects in terms of the world wide web. I even use a system at work that runs on an intranet but it's built in JavaScript and Java from what I can figure. So in turn I thought about this and thought theres nothing really stopping me hypothetically building something for a company to run on there local server. Which is when I thought about Flex. Is this the kind of thing people are often expecting to do with Flex? I had previously always wondered what the deal is with Flex and how it would benefit me. Could you perhaps explain why you would want to build something in Flex? What are it's benefits as opposed to using HTML PHP CSS It's down sides I think I understand why it's classed as rich but with the emergence of HTML 5 will this have a downside on FLEX? Apologies for the many questions, i'm just curious. Theres obviously no rush with this question as I know your busy writing currently, but if you or anyone else gets chance to enlighten me, please do Thanks Apologies for the awful spelling on the title
  8. Yes!!Mad isn't it! I think 1 of my very first questions on larry's site, back when it was called something else was about this. It's a weird thing to get your head around isn't it.
  9. I agree, I really enjoy a book I can scribble on etc whilst things pop into my head. I forgot to mention that I also brought Larry's Ajax book which was a really nice intro into ajax. Especially when you've read the section in PHP 5 advanced. But I also read about a year ago o'reilly's js missing manual book. I found it good but I found it a bit hard work in places. To be honest I don't think I was ready for it then and should perhaps go back and read it again. I actually meant to message HartleySan the other day and ask him about his experiences with learning js because I can see his knowledge around the topic is a lot better than mine. But it is a tough question, because there's just so much to learn about the web. It expands at such a pace I sometimes find it hard to keep up. That being said, sometimes you bite of more than you can chew. And in retrospect I think at that time it was too much for me to fully understand to be useful to me. Obviously parts of it were, they tended to be things based around jquery. Which brings me to my next point. Sometimes you don't neccessarily need to know how every tiny thing works. I want to know because I just do. But if something does what you want it to do but you don't understand how, then is that 'bad'? I would say no. So on that basis you could look into the jquery framework, they have lots and lots of well documented plugins for a mass of functions. They are generally pretty easy to install and use too!! Many of them involve jquery ajax so they look really smart and the degrade well in lesser (ie 6) browsers.
  10. Hi MikeMikeMike Take note of this line FROM specific_coffees AS sc And INNER JOIN general_coffees AS gc This is where the shortcut so to speak is created so the database recognises 'gc' as the table 'general coffees'.
  11. I would think you could change it to "onClick", so when you click the hyperlink you call the new ajax request.
  12. Hello Paul, Your question is good. In my opinion you could learn how to add in AJAX into your websites, that will make sure sites interactive and allow for a smooth dynamic experience. By learning some JavaScript you will be able to implement AJAX (Asynchronous JavaScript and XML) into your site and modify your HTML on the fly or on certain events such as onMouseOver. But I wouldn't say you need to learn JavaScript from scratch, but the better you understand a language the more you can do with it. Its a case of weighing up time with knowledge and mainly productivity. What's the point of knowing 99% of the JavaScript language (If anyone actually does) If you only ever use 2%?? Larry's book your reading is good I enjoyed it found it great for my learning, I also read PHP 5 advanced that was also good and introduced me into some things I just wouldn't have found or come across on the web unless someone else told me. It also has a good section on AJAX. I think that a good book on AJAX could be the next logical step, in my eyes that is. But I think making sure you pick a book that works for you is important. If you need some JavaScript knowledge to read it and you don't have any then it may be tough. Anyway just my thoughts
  13. Hi Preston, This book has some complicated parts to it. So you may do well to buy PHP and MYSQL that Larry is updating now. I say this because if you are unfamiliar with how that link works then you should probably back up a bit. In my opinion. But to answer your question the ? Is used to represent a $_GET variable. The code would look like: if(isset($_GET['x'])) { // use variable in script } This then allows you to pull the info from the url into your scripts to use. I hope that helps, if you need any thing else please ask To add to this: What Larry means with this link is. He will send you an email when you register saying welcome etc etc to activate your account please click the link. The link will have the user's email which is what you can see x= but it will also have another variable 'y=', although you can pick whatever to call them. 'y' will often represent a unique id. Then when you click that link you go to actiavte.php, which you write to pull the x and y variables from the url and use them usually in a MYSQL query. Such as, "UPDATE users SET `activated`=NULL WHERE `email`='$x' AND `activated`=$y LIMIT 1" This is a very basic example of how to do it and it involves no security at all. "PHP and MYSQL" has a lot of really good stuff in it including this. You're likely use most of the material in the book alot and it will compound your understanding for more complicated areas. Anyway, again, hope that helps, shout if your still confused
  14. Perhaps this may be some use of it Auto populate multiple select boxes In terms of saving it as you go, I can only suggest that when you call the ajax request you use sessions to track the inputs.
  15. Hi Chop, I think if you want to do it in 1 fell swoop, where the selection of 1 category then leads to only models relating to the chosen category? I think you would have to encorparate some javascript into the matter. Otherwise I think you would have to send the results of the 1st part of the form to a page that then filters the results options shown in the next part of the form, using the information submitted from the 1st part of the form. (If that makes sense) I'm going to have a look into it for you though
  16. On a lighter note does the writer of that code know that "apparently" @Error supression is 235% slower than without @error
  17. Hi Ryan R, What you could do here is query the database with the email specified. Then: if (mysqli_num_rows($r) != 0) { echo 'This email is already in the databse'; } else { // proceed to insert email into databse } Hope that helps Let me know
  18. What password is it returning. (I'm not sure you can do what your trying to do here due to the hash)
  19. You can download the source for this book from www.larryullman.com/books/
  20. I think what your trying to do isn't possible. If I understand correctly. htdocs and localhost are the same thing in round about ways - basically the root. But as you say that stops you using more than one project efficiently at a top level. I think i'm right in saying that most people would have to do the following: xampp | htdocs ____________|________________ | | | cp another project other project inside htdocs, store each project in it's own folder (if you intend to have more than 1 project in xmapp that is, if you onyl have one then you can leave it in htdocs. Then to access your projects the url would be: http://localhost/cp/ not http://localhost/htdocs/cp Does that help? In what way can't you get Apache to recognise the home directory??
  21. Hi, The book has some quite complex code in it, so if you are new to PHP you may struggle to adapt your code to meet your needs. I have read Larry's "PHP and MYSQL" which is a good primer for the effortless e-commerce book. There is also "PHP for the Web" which may be a good option for you too, however I haven't read it. In answer to your question: To a pass over the SKU there are a couple of ways. I suspect that the $_GET['var'] will suffice. To use this you need to have a set up similar to this: page.php <?php echo '<a href="product.php?sku=15">See Product 15</a>'; ?> then on product.php <?php if(isset($_GET['sku'])) { $sku = $_GET['sku']; } else { // default page if no sku or invalid } ?> From there you can use the $sku variable you created in your mysqli queries Hope that helps
  22. Hi Tonyk, I haven't got the book your using, but I can try and help you. In terms of a captcha, not quite. A captcha only really tries to protect you from robots using your form. The idea being that a robot can't read the captcha, but a human can. They are actually relatively easy to install and make you feel pleased with the end result. You can also just use a simple maths question, I seee that used a lot too. What a captcha can't protect against is human span. I could go on to your form and pass captcha validation, but then use various headers to try and spam your form. So in short a captcha can be helpful. Validation of entries is always a good step, but you don't actually need javascript to validate it. Although it does look nice and enhance the user experience. If you make your form sticky, you will not erase entries if there was an error. Finally I would say in a contact form, the main focus should be stopping malicious input. Larry's book your waiting for did (in the previous edition that I have) have a topic regarding sending mail and scrubbing spam that you'll find very helpful to your form. Regarding WP I don't use it, I have played with it however. I think it's OO so without a solid base of PHP to start with I think it would be hard to be able to get your head around. I may be wrong. Anyway, let me know how you get on
  23. Just wondered if anyone had any experience with these two programs and what they thought of them. I've just downloaded them so I'm going to try and have a play and let you know how I get on.
×
×
  • Create New...