Jump to content

KevinM1

Moderators
  • Posts

    5,222
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by KevinM1

  1. We're not going to simply read through your entire script and hand you back a fixed version. Do you have a specific question/problem?
  2. You avoid the notice by checking to see if the variable exists. Index, in this context, means array index. The array in question is $_POST. It's telling you that $_POST['user_name'] doesn't exist; or, more specifically, 'user_name' is an undefined index because it wasn't set during the POST because whatever form input it's supposed to come from was empty. So, you need to ensure that the variable exists by checking either isset or empty before attempting to use it in another way.
  3. if ($_SESSION['user_id'] == 123 || $_SESSION['user_id'] == 456) { include('admin_nav.inc'); }
  4. Parted Magic (PMagic) uses both Parted and GParted, and is incredibly easy to use: http://partedmagic.com/doku.php
  5. I like the colors and the 'Express Cars' arrow logo of the old one, and the structure of the new one. Blue, white, and gray seem to be the company's colors. Stick with those, but use gray only as an accent color. It should be used for borders, and for text link roll-overs. I think that white should be the main content background color. It's just a more natural fit if you're going to have more than a paragraph or two of text that you expect the user to read. You can have the blue as the color of your <body> tag, and then white as the color of your content <div>, giving you the added color without sacrificing readability. For your main navigation rollovers: 1. Get rid of the double | | around each button. Have one | between each, and use padding to give space for the text. 2. Get rid of the underline. 3. Don't use gray. Your buttons should either be blue or white (depending on how they look with the background color - play with it), with the rollover color as the opposite. You want to reinforce the brand, and to do that, you use the brand's colors. 4. Don't use serif fonts. 5. Make them bigger. 10%-15% bigger. 6. Give them a top margin to move them away from the top of the browser window a bit. Something like 5-10px. You can make good looking links with just text and a background color/image. The key is typography, to make them look both stylish and easily readable. That's one of the reasons why serif fonts are generally frowned upon. They add more stuff for the eye to dig through before it can decipher meaning. Adding even more junk in the way of underlines and extra dividers only makes it worse.
  6. Your boss needs to invest in Photoshop, and learn how to design sites. He has no idea about what looks good.
  7. Looks very amateurish and dated. Colors are garish, you use serif-fonts, there's scrolling text, and hard to read/see images. And, under the hood, inline CSS. Geocities called, and they want their site back. I say scrap it, look at Smashing Magazine for inspiration, and start again. Aside from an okay structure (except the inline CSS), there's not much that I would consider to be of value in the design. Especially since its for a business. Frankly, a site like this will not generate business. Users aren't dumb. They've been exposed to a variety of sites that are all more engaging, easier to use, and just plain better looking. In a sea of better designed sites, do you think this will work? I'm not trying to be harsh, but business is a cruel exercise. Better to hear it now, before it goes live, than to launch the site and generate no business from it. What you should do is: 1. Start with an actual design. Based on what I see, you likely started with the HTML first, and then layered CSS on top of it. You also likely took what the client wanted for color, and just decided to put it on the page without really knowing if it would all work. That's the wrong way to go. Start with a design in Photoshop, or some other graphic editor. Make it look good there first. Yeah, it takes some time and effort to transfer it to HTML/CSS, but it's worth starting from there. Why? Because you'll be thinking in terms of raw aesthetics and usability, and if the design sucks, you can easily start again. 2. Have an eye for color. Gray with lime green, electric blue, and teal does not look good. Read: http://www.smashingmagazine.com/2010/01/28/color-theory-for-designers-part-1-the-meaning-of-color/ And play around with: http://www.colourlovers.com/copaso/ColorPaletteSoftware 3. Serif fonts are the devil. They're not good to use unless you're writing a book. Look at all of the sites you think are awesomely designed. How many use serif fonts? Exactly. 4. Scrolling text hardly ever works. And it never works as bold, teal text scrolling on a boring blue background at fast speed. If you can't do it right (which is hard), don't do it at all. 5. Do more with your images. Your slide show is sloppy because: A. The images are small. B. The text is even smaller, and simply placed on top of the images in a white box. If you have a slide show, it should be front and center, and, above all else, meaningful. Larger images. If you're going to have text on the images, figure out ways to make it dynamic. Make it larger, so it's readable. If you're going to put it in a box, give the box (not the text) color, and perhaps some transparency. The pixelated chauffeur with the pixelated gray car? Unless it's their logo, ditch it. If it is their logo, you need to do a better job incorporating it into the site. And why aren't you using the Express Cars graphic from the original index? It looks far better than what you have now. You need to spend more than an hour or two on this. Good looking sites take time to develop. What I see is a coder who doesn't like design trying to rush it, hoping that it will be 'good enough'. It's not. You have a responsibility to your client to make a better site than what they currently have. I don't see it.
  8. Enough. All Adam said was: A. You're doing things in an odd way. B. It's difficult to see what you're trying to do because you're going a hundred miles an hour. We don't know what your project is, so we don't have the frame of reference you do. You write as though you assume we all are following your progress. We're not. C. He said he didn't want to help in a way that would teach you bad habits. With that said, here are a few things to keep in mind: 1. We are not obligated to help you, or anyone else. We, even those of us with pretty badges, are all volunteers. We don't see one red cent from being here. So, before you cop an attitude and try to tell one of the team members off, remember that we're giving you free access to legit professionals who are volunteering out of the goodness of their hearts. 2. Since we are professionals, we like steering our members down the right path. We're not going to give you an answer that will make you a worse developer down the road. We have standards, and if you don't like that, you're free to find a place that will give you whatever hacks are necessary to make your code 'work'. 3. You need to learn how to write intelligent questions. The quality of answers received is directly proportional to the quality of questions given. If answers aren't to your liking, and if we keep asking for clarity, don't assume we're idiots who are trying to work against you. For all questions, you should have: A. What you're attempting to do in clear terms B. What code you're using to get those results - relevant code only C. How the results differ from what was expected in explicit terms, including full error/warning text with line numbers, and the lines clearly marked in the post Don't assume we're following along with your posts spread throughout various subforums. We see thousands of messages a day. We don't tend to keep track of what each member is doing. In short, you're among professionals here. If you can't behave appropriately, we don't want you. You're not a precious snowflake, and neither you nor your problems are more important than any other member's.
  9. These two lines: var div = me.updateCartView( document.createElement("diver") ); diver = "<div class='StoreCart_items'>" + div.innerHTML + "</div>"; Don't make any sense. document.createElement() takes a tag name as an argument, meaning something along the lines of 'div', 'a', 'span', etc. With this code, you're trying to create <diver></diver>, which is gibberish. It looks like, without knowing what updateCartView() does, you want something like: var div = document.createElement('div'); var cart = me.updateCartView(div); cart.className = 'StoreCart_Items';
  10. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=349596.0
  11. This topic has been moved to FAQ/Code Snippet Repository. http://www.phpfreaks.com/forums/index.php?topic=349561.0
  12. What do you mean by 'conflict'? Are you getting any errors? Have you tried running it with Firebug, or Chrome developer tools running?
  13. Okay, now we're getting somewhere. You need to fetch the results after you run the query, just like normal: $query = "SELECT COUNT(*) FROM table WHERE category_id = $catID"; $result = mysql_query($query); $row = mysql_fetch_array($result); echo "Number of entries: " . $row[0];
  14. Then Dan and Pikachu's replies should work. If you tried one of them, and the results don't look right, then we'll need to know: A. What the results were Compared to: B: What you expected
  15. What do you mean by 'value' in this context? The value of a different column in the same table, like title or body? Or just how many items share that category_id?
  16. We can't help you because we're guessing about what you want based on your complete lack of detail and poorly explained problem. So, again: SHOW US YOUR TABLE(S) And tell us explicitly how you want to use the data from which column(s).
  17. Why don't you show us how your tables are laid out?
  18. Post your current code. And be sure to put it between either or tags.
  19. The most popular PHP frameworks - Code Igniter, Kohana, Synfony2, and Zend - all support/implement MVC.
  20. ... And you believed them? Microsoft? I hear IE 10 will have blast processing.
  21. Here's to IE 6!
  22. Matt, you may want to re-read through this entire thread. All of us have said to use certain functions before doing certain things. That's why I mentioned escaping strings before using them in a db query. That's why several others discussed using htmlentities before outputting user-supplied data. There are 5 pages discussing not only what to use, not only how to use them, but also why. There's no "Do the following things for EVERY SINGLE THING you come across" standard. Instead, it's all "If this is what you're doing, do X. If this other thing is what you're doing, do Y." What you should do is brush up on the basics. You have a very rudimentary, and partially flawed, view of PHP and web security in general. You're arguing from ignorance, and there are only so many ways for us to (re)explain things.
  23. gristoi, it may work, but it's semantically wrong. IDs are supposed to be unique for the entire HTML document.
  24. Matt, validation and sanitation are two different things. Validation: Is the data valid? Does it fit what I'm trying to do? Sanitation: Is the data harmful? That said, validation and sanitation go hand-in-hand. You check to see if data is valid before running it through whatever process you need to run it through for security's sake. Example: A hypothetical site requires that passwords be at least 8 characters long, and not contain any special characters except !@#$. Is that a universal condition? Of course not. How could you standardize it? You can't. Using the example site condition above, if an incoming password didn't match the condition, you'd abort the login process immediately. You wouldn't continue to the part where you escape it for the query. Dates can be tricky. How are they entered? American style? European style? Allow for both? One textbox for the entire thing? Individual textboxes for each component? Drop downs? What about phone numbers? Do you force the user to supply the area code? What about international numbers? How about files? Are you just going to check their extensions? MIME types? What if they don't have an extension? Are you going to do any other kind of integrity check? Are you going to blindly accept any kind of file, or does your web app have a particular focus?
  25. Remember that ids are supposed to be unique. If you have multiple ViewRecords or ViewMoreHiddens, JavaScript will only 'see' the first one.
×
×
  • 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.