Jump to content

JasonLewis

Members
  • Posts

    3,347
  • Joined

  • Last visited

Everything posted by JasonLewis

  1. Not that I know of. It's usually up to the developer to ensure that code is cross browser compliant, or at least degrades gracefully in older browsers. The less hacks you use, the better. I personally avoid using hacks all together. If I have the option of making something work with a hack, I'll avoid it and just let it degrade gracefully. It might not look as flash as it should, but at least everything is valid and hack free. BTW the HTML/CSS section would've been a more appropriate spot for this.
  2. Actually the colon in front of the word just makes referencing it a whole lot easier. I believe you could use whatever you wanted. If you check out the manual, it explains the difference between bindParam and bindValue. Example: $roomId = 5; // Do PDO connection stuff here and prepare your query. $stmnt->bindParam(':roomid', $roomId); $roomId = 6; // This actually changes the bound parameter (:roomid) to 6, as the variable was bound by reference so any changes made to the original are reflected here. bindValue() on the other hand simply binds the variable without referencing it. The data you bind is escaped, and it's recommended you declare the type of data your are expecting with the 3rd parameter. In answer to your other question, about what the manual says, I've never used the driver options so am unable to explain the meaning of them.
  3. I believe you should be using PDO::prepare() and not PDO::query(), also no need to enclose your placeholder in single quotes. PDO::query() executes the query straight away so I don't see how binding the parameter after this would help. Although I haven't used PDO in a while, so I could be wrong.
  4. A good way to determine if things are not loading correctly is to use Firebug. You can then inspect the element and it'll show the URL to the background image in the CSS panel. Hover over this, if it loads then everything is good and you probably need to do what wildteen88 has mentioned.
  5. Or use an image to achieve the desired result? Shadows can be a bit frustrating at the moment.
  6. PDO::query() returns a statement object if the query was successful, or false if it failed. Perhaps your query is failing? I've heard rumors about the deprecation of the MySQL extension for PHP (probably not for a while) in favor of the other (better) extensions such as MySQLi and the PDO abstraction layer. They are better. They offer a heap of great features and promote reusable code. Plus it's based around objects.
  7. Yew, can I get mine changed to Jaysonic please. ProjectFear, gah, what was I thinking back in those days. Please and thanks.
  8. Who runs IE in compatibility mode? (Who runs IE? )
  9. Do you actually mean connecting to facebook or is "Facebook Connect" something else? Facebook Connect allows people to essentially 'join' your site with their Facebook login information. Can be a bit annoying to manage though.
  10. It would make more sense for you to do it this way. That way if there are any methods that both of your pie() and bar() methods share it'll be a lot cleaner.
  11. Additionally you can use parse_url. Read that manual entry carefully, as it states it does not validate the URL, it merely breaks it down into the components.
  12. Generally what I do is in the head of my document, prior to loading any JavaScript files I'll create a JavaScript variable 'g_url' and set this to my sites base URL, which is set via PHP. <script type="text/javascript"> var g_url = 'http://www.yourbaseurl.com/'; </script>
  13. What are you trying to achieve exactly? What you've posted isn't really much, and it's perfectly valid and fine. Bit more information could be useful.
  14. The undefined index is coming from the $_POST['username'] part, to be precise. This is because either 1) you have no submitted a form or 2) the username field in your form has an incorrect name. My suggestion is to ensure that you have a form, and that the name for the username field matches the key name in your $_POST array. You can do a print_r on $_POST to see if it's all being sent properly. print_r($_POST);
  15. No one is going to throw something at you like that. You'd need to take advantage of the GD library. A quick Google search comes up with a few things: http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/ < this one uses OOP from a quick glance http://www.phptoys.com/e107_plugins/content/content.php?content.46 It's something you're just going to have to attempt to do yourself. Those aren't the only two tutorials either, there are a heap out there. Just look around, if you have any more problems let us know.
  16. When creating things like this you can't exactly use plain old echo to display things. You'd need to use sprintf Here is what you'd do, in your language file you'd have something like this: $lang['msgs'] = 'you have %d messages'; Then when you are formatting the text all you need to do is: $total_messages = 8; $messages = sprintf($lang['msgs'], $total_messages);
  17. It slides open a news item, but for some reason my browser scrolls to the bottom of the page for what seems like no reason at all. Using Firefox 4.0.1 if that helps.
  18. Be aware though that this does rely on the user having JavaScript enabled. Majority do these days, not sure how common it is for it to be disabled. But just be aware of that fact. Glad it worked. Hit the solved, bottom left of page, if you don't mind.
  19. +1 to liking it. I noticed when you click on the language box all 4 borders are rounded on the dropdown items. Perhaps only rounding the top left/right and bottom left/right borders of the top and bottom items (did that make sense?) Also, when on the /news page and I was scrolled all the way to the top, clicking on a news item scrolls me to the bottom. Looks strange, not sure if that's supposed to happen. Perhaps when you mouseover the Twitter, Facebook and other icons they can change to their colored counterparts. Something simple like that is often a nice touch, and would make them stand out great against that lighter background color. You've styled your input boxes for the login box that appears but not the login button. It just looks ugly like that. Perhaps add a nice gradient too it and maybe a hover change as well to give it some flare. I didn't look around everywhere but it is a really nice site. Loaded quick for me, so that was no problem. Good job, I applaud you.
  20. Heh. Geedo is alright I think. How do you pronounce it exactly? Like it's spelt I guess? Gee-do or is it G-do?
  21. You want it to redirect them to another site? Well then you'd need a bit of JavaScript, not PHP. <select name="projekt" onchange="javascript: window.location=this.options[this.options.selectedIndex].value"> Then you can set the value to the location of each site, example: $moznosti .= '<option value="http://examplesite.com/something.php?id=' . $id . '">' . $projekt . '</option>'; Going on memory here, not tested. Good luck.
  22. Your best bet to figure this out would to be posting this question on the phpBB forums. Besides that, try this mod, it seems to be newer. Might work for you. EDIT: That said, you might want to read this which is about said mod above. It might be worthwhile if you post your queries over at their forums. Unless someone else here uses phpBB.
  23. Just supply a radio option with "No choice" as the value or something along those lines.
  24. I generally just generate a random confirmation code like you mentioned. Only takes a couple extra lines of code.
  25. It cuts out all the crap, and handles bucket loads of cross-browser related issues. Makes life so much simpler, and developing rich interactive applications a breeze.
×
×
  • 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.