Jump to content

roopurt18

Staff Alumni
  • Posts

    3,746
  • Joined

  • Last visited

    Never

Everything posted by roopurt18

  1. Play with the stylesheet until it's fixed; I think there is a property that you can set the background image to no-repeat with. But I don't know what it is off the top of my head.
  2. Well, those images look like they came straight out of MS Paint. If you want to create professional graphics you need a good image editor. Photoshop is highly recommended, but runs about 800 U.S.D. so is probably out of your budget. There is a free image editor available named Gimp, though I've not used it. I recommend downloading and installing it and then looking for tutorials online.
  3. I don't even know where to begin, but I'll warn you now, you're in for lots of harsh feedback. It's downright awful. The image quality is terrible; they're grainy and of low quality. Your background image for the navigation is repeating itself horizontally in Firefox. Your animated gif is likely to give someone a seizure. The entire site is much too monotone. I see only three colors (other than white) and the blue is so predominant it feels like that's all it is. Not to mention that it's a much too dark of a blue IMO. I don't know what's going on in your footer, but there are hidden links and weird wrapping issues. I'm guessing that English is not your native language, but you really need to go over that site with a fine toothed comb. There are some simple misspellings and oddly worded phrases. Also, get rid of the clock in the header. It serves no purpose. My operating system already tells me what time it is, as does the clock on the wall, and various other things in my environment.
  4. I notice in your CREATE TABLE you have a `name` column but in your code you refer to `appname`. Since your SELECT and UPDATE queries are searching on the `user` and `name` columns, try adding an appropriate INDEX to your table: ALTER TABLE `invites` ADD INDEX ( `user` , `name` ) It's probably not advisable to create an INDEX on the entire `name` column as it's 100 characters long, you can limit the size of the INDEX with: ALTER TABLE `invites` ADD INDEX ( `user` , `name` (12) ) Someone with more MySQL experience than I have can tell you if that's a better practice than using the entire field. If you have access to phpMyAdmin you should try running the queries directly from there and use EXPLAIN to get more information about how MySQL is running them. P.S. Use `name` or `appname` in your SQL statements depending on what the column is actually called in the table.
  5. Focus on one thing at a time and start with the ones you enjoy most. If you enjoy the media aspect, from photoshop, after effects, flash, 3ds, etc. pick one and just work with it for a few months. Work with only it. Then pick a new one and focus on that. When you decide you need a break from the media aspect of it, jump back over to programming. Learn any programming or markup language. Who cares if XHTML 2.0 is coming out soon? It's still mostly based on XHTML 1.1. If you program in PHP4 correctly all of your code should be directly portable to PHP5 and possibly even PHP6. When you get tired of programming, pick up some books on databases, design patterns, object oriented programming, etc. You need to work on one thing at a time until you are proficient at it. By constantly jumping around from topic to topic you will learn only enough to get by, and that is a dangerous thing. You will create projects that are messy and impossible to maintain. Expose yourself to as much as possible, but do it one or two topics at a time. You have no clue what your first development position will be, but it will dictate what you start to become a professional at.
  6. A few questions: Are you sure that is the code that is causing the problem? How many records are in your `invites` table? Do you have any indexes in the `invites` table? How often is that code run? I know you said the DB is receiving ~300 queries per second, but is that because that code is executed on every page load? Every couple page loads? How many users are hitting your site?
  7. Give the COUNT() column an alias, then you refer to it just like any other column: SELECT testQuestion, COUNT(testQuestion) AS `nCount` FROM synTests WHERE testNum = '$test' GROUP BY testQuestion
  8. @bobahad I was referring to this: id="checkbox[]" As far as I can tell, assigning an element's ID in that manner is useless.
  9. xiao, unless you're calling header() before redisplaying the form, I'd be curious as to why you're storing the form values in the session to begin with. @revraz That logic is incorrect as far as I can tell. Let's say you have a data field that allows for apostrophes but not backslashes. If you escape and then validate, your validation will reject any input with a \' which would have been valid input before you escaped. In most cases, I would say it doesn't matter when you do it, but it's safest IMO to escape just prior to entering into the database.
  10. Do you already know how to perform form processing? Or is that totally new to you?
  11. If your host is *nix based and you can use system() or exec(), I'd suggest pushing the appropriate tar command to the shell.
  12. @bobahad Perhaps you know something that I don't, but isn't it incorrect to assign the same ID to all of your checkboxes? If you're not using JS, you can drop the ID attribute anyways.
  13. Well your first task is generating the table, for that you will need to: Grab all the records Echo the table header for each record echo a table row [*]echo the table footer Do you know how to do any of that? If not, you may want to look at some general PHP / MySQL tutorials first.
  14. How about a query like: SELECT * FROM `table1` t1 INNER JOIN `table2` t2 ON t1.`answer_2`=t2.`answer_2` INNER JOIN `table3` t3 ON t1.`answer_3`=t3.`answer_3` And then you can add the appropriate LIMIT clause for your pagination?
  15. Your description is not very clear. Could you perhaps provide an example? The example doesn't have to match your program exactly, but it should be analogous.
  16. VHS or Beta? Hmmmmm...I'd follow hcdarkmage's advice.
  17. Is `rank` an INTEGER column? If so, try removing the single quotes around $id_rank in your query.
  18. I'm going to go out on a limb here and guess that your images are always stored in images/ and the thumbnails are always stored in images/thumbs/. If that is the case then I pose a hypothetical question for you: If the directories where the images are stored are always the same and known in advance, why bother storing them in the database at all? *hint* You could probably get by with storing just the filename. *hint*
  19. var input = document.createElement('input'); input.setAttribute('type', 'text'); input.setAttribute('size', '40'); // assuming insertPoint is the node to insert under insertPoint.appendChild(input);
  20. Hmmmm...I believe you are going about things a little bit awkwardly here. First off, while innerHTML does work, I recommend using DOM methods to dynamically add and remove contents from your form. While it takes a slight adjustment to get used to, it does simplify things in the long run IMO. Additionally, it looks like your Javascript only allows to add a row at the end of existing rows and also only allows to delete the last row added. What if the user wants to insert a row or delete a middle row? Secondly, I'm assuming you are sending the i value to indicate to your PHP script how many rows exist. This is totally unnecessary. Instead of naming your inputs db1, db2, db3, ..., dbi, just name them db[]. This will send their contents as an array and you can just do this in your PHP code: foreach($_POST['db'] as $db){ // process the field } The beauty of sending the db fields as an array is then you can easily allow the insert to insert or delete any row in your form without having to go back and rename the other ones.
  21. You will likely need to shell out a small monthly fee for web hosting then in order to have a widely accessible test area. I recommend The Web Host Freaks.
  22. 5 or 6 years ago I think it was still possible to claim you were an expert, but I don't think anyone really can anymore. While someone can still claim to be an expert at specific (or small group of) technology A (be it PHP, Apache, MySQL, C++, DirectX, etc.) there is now so much overlap in software solutions that I don't think anyone knows how the whole solution works anymore. If you look at pure programming, I'd consider myself at least among the cream of the crop, but if you look at web development as a profession, it goes deeper than programming. There are server setup issues, such as optimizing MySQL and Apache for your site's needs. Then you have overall software design as well as actual site design. So while I consider myself to be a great programmer, I'm mostly average in those other areas. On the contrary if you look at some of the other mods or recommended members, they seem to excel in those other areas (or at least spend more time in those topics). Any one of us knows enough to get the job done, but some of us would do different parts of it better than others. I think these days the more appropriate titles would be: learning proficient self-sufficient highly experienced You will know you've crossed a line when you find that you are answering more questions than you are asking. When you've reached that point, you need to start looking at more efficient ways to accomplish things in your programs, worry about algorithm efficiency, etc. if you want to cross the next hurdle.
  23. True, but the OP stated for testing purposes. Depending on the nature of the cron, it is likely that it can just be invoked from the CLI to determine if it works or not.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.