Jump to content
Larry Ullman's Book Forums

HartleySan

Members
  • Posts

    3047
  • Joined

  • Last visited

  • Days Won

    243

Everything posted by HartleySan

  1. HartleySan

    Long Time, No See!

    Yes, OSU is The Ohio State University, which a Michigan man like another_noob would immediately pick up on. Also, thanks for sharing a little bit about yourself as well, Necuima. I'm glad to hear that web development is keeping things interesting for you in retirement. I'd also love to hear a thing or two about all the technologies you touched in your career sometime. I find it quite fascinating to think about where things have come from, and how they have affected the present. On a side note, I lived in Japan for almost 8 years, and spent a lot of those years working as a translator/interpreter. I mention that because within Japanese translation circles, probably the most popular website is one called WWWJDIC, which was created and is maintained by a guy named Jim Breen at Monash University. He's world-famous (or at least famous in Japan). The WWWJDIC site itself is ancient (originally made in 1994 with CGI scripts, and has updated it very little since), but it's the authority for all things related to Japanese translation. Anyway, I just wanted to share that because it's run out of Monash University.
  2. HartleySan

    Long Time, No See!

    Well, I work at OSU, but no hard feelings towards Michigan, of course. Naturally, I want the Bucks to win the game next week, but aside from that, Michigan is a great school. Also, just keep at it, and you'll get there.
  3. HartleySan

    Long Time, No See!

    Wow! It sounds like you've been pretty busy, another_noob. Congrats! Also, kudos on taking the initiative to do all those cool things. It sounds like you're making quite a name for yourself. I think you're very right in that there are a lot of needs out there, and if you find the need and show the client how you can fill that need, you can very effectively create a name for yourself. I've been back from Japan for about a year and a half now. I spend about 8 months working on a fairly large e-commerce site, and after that, I got a job at my alma mater university. Currently, I'm working full-time at the university as a sys admin and lead programmer for one of the main systems used by the university. It's a pretty exciting job in that I pretty much get to call the shots and people look to me to make the necessary decisions to get the job done. It might seem stressful, but I enjoy the challenge, and being in the university setting, people are fairly laid-back, so it's not too bad. Anyway, for all of you out there looking to "make it", I can attest to the fact that it can be done, even if you're in a completely different industry now. In my case, I've been hanging around this forum for a number of years, slowing learning over time. Larry can fully attest to the fact that there was a time when not only was I not nearly as helpful, but I would annoy the heck out of him with the most ridiculous questions. So for all of you that want to do web development/programming as a career, stay healthy and hungry, and keep asking those tough questions, and you will make it. (I didn't mean to turn this post into such an inspiration message there at the end.)
  4. Full-screening the image is done with simple CSS, and creating a slideshow is mostly JS. While that topic specifically is not covered in Larry's JS book, you could still probably learn enough in the book to do it yourself. You could also do some Googling for "JS slideshow", and probably get it done from there.
  5. Use the PHP scandir function to scan a directory, pull out the files you want, and then use img tags surrounded by a tags to create images that can open another page when they're clicked on. After that, it's using CSS and whatnot to customize the page as you desire.
  6. Yes, for an IP address lookup, you would either need to hit up an API (the preferred option, since it's always up to date) or have a database for referencing. Here's one such API you could use for IP address lookups: http://ipinfodb.com/ip_location_api.php The rest of what you need all sounds like business logic for your site and is pretty straightforward, so I'll let you handle all of that.
  7. If they're on a device that supports geolocation, use the JS Geolocation API. If they're not (i.e., most desktop PCs), you can approximate their location by their IP address. (Although it won't be as accurate as geolocation, you should be able to get their country without problems.)
  8. As Antonio said, being able to use a Unix environment is important for more advanced web development, but don't feel like you have to go out and buy a new (expensive) Mac to do so. If you already have a Windows PC, you can use that for now, and when you decide it's time to learn more about how servers run, etc., you can use VirtualBox or whatever to install a virtual Linux environment (e.g., Ubuntu, Red Hat, etc.), and install and run a server in that environment for free. Having had to use all different environments for work, I actually prefer a Linux environment over a Mac OS environment. Also, if you're going to use Windows, Notepad++ is good, but I actually prefer Notepad2, as it's much simpler to use and more than adequately gets the job done. All the same, welcome to the forums, and best of luck.
  9. Where is the folder in relation to the script you are running? In other words, what is your folder structure?
  10. Yeah, these things happen, so don't sweat it. It's all part of the learning process.
  11. What happens when you execute the following query directly on the DB? INSERT INTO users (email, pass, first_name, last_name, active, registration_date) VALUES ('1@2.com', SHA1('zzzzzzzz'), 'xx', 'yy', '38f7125efa20dccb8da938bd95cdda1e', NOW()); Also, is user_level a required field?
  12. Good to know, and sorry I couldn't help; I was not sure what to suggest.
  13. And could you please copy and paste the structure of your users table into a post as well? Thanks.
  14. Yeah, you might be right about the INSERT INTO SELECT syntax. I actually haven't used a subquery like that since my college course on DBs. In other words, I've never used a query like that in the real world. If you already have the hotel ID and comments, etc. though, I would just do a regular insert like follows: INSERT INTO information (hotels_id, comments, ratings, date_created) VALUES ($hotel_id, '$comments', '$ratings', NOW());
  15. Where is the VALUES keyword between your sets of parentheses for the INSERT statement? Also, in your subquery, why are you selecting info from the table you are inserting into and then re-inserting it? I'm a bit confused about what you are looking to accomplish here. As far as I can tell, so long as you have the hotel ID, the comment text and the rating, you shouldn't require a subquery within your INSERT statement.
  16. There are (usually minor) discrepancies between all browsers (and even different versions of the same browser) regarding how they size certain elements, etc., so that sort of problem is not entirely surprising to me.
  17. Glad you found the solution, and yes, the console is great for debugging front-end code.
  18. Hello, Lance, and welcome to the forums. A few questions: Does the script tag that links to the editor show up in your source code? In your browser console, do you get any errors related to TinyMCE not loading? If not #2 above, do you get any errors related to actually trying to initialize the editor? Thanks.
  19. It's neither an always or a never thing. It's a what-makes-the-most-sense thing. Just like you'd never have one PHP script that managed an entire site, it very rarely makes sense to have one script that both handles the initial load and handles all the Ajax requests. Generally, they're just too fundamentally different things for one script to efficiently handle. If you don't believe me, try to do everything in one script, and I think you'll quickly see what I'm saying. As for sessions, there is no concern there. All scripts have access to the same user session. As for JS being disabled, that will not affect which script an Ajax request is sent to because you can't use Ajax at all when JS is disabled. If you want to have a site that works with and without JS, then you should first code the whole site without any JS, and then go back and add the JS layer on top of that. Of course, that adds a lot of time to development, and honestly, these days, the gains of doing so are much more minimal than they were in the past. Lastly, when you make an Ajax request, you need to send whatever info is required, but that's no different than any non-Ajax request. The web is stateless (minus cookies and sessions), so nothing is remembered between script calls, and the data that is required must be passed back and forth accordingly.
  20. Set up an onchange event listener for the select element, and then call the ajax method within the listener. Beyond that, it's simply a matter of adding the correction logic to the PHP script called, etc. And by the way, didn't we talk about not sending Ajax requests to the same PHP file before?
×
×
  • Create New...