Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. If it's a pretty small amount of items and you only want the price, you could just use something as simple as: <script type="text/javascript"> var items = { 'prod_1': 12.50, 'prod_2': 1.25, 'prod_3': 4.35, 'prod_4': 3.33 }; function updatePrice(obj) { if (items[obj.value] == undefined) { return false; } document.getElementById('price').innerHTML = items[obj.value]; } </script> <select onchange="updatePrice(this);"> <option value="prod_1">Prod 1</option> <option value="prod_2">Prod 2</option> <option value="prod_3">Prod 3</option> <option value="prod_4">Prod 4</option> </select> £<span id="price">-</span> ..Generating the JS array with PHP.
  2. The navigation isn't clear enough in my opinion. At a quick glance the icons won't immediately be obvious what they mean to less-experienced internet users; especially since they're pixelated - use PNG image format for transparency instead. Hovering over them does display the title text but there's a brief delay in which the user could have skimmed over. The navigation should be as simple and straight forward as possible, especially if you're selling IT services. The design itself is fairly plain as others have mentioned. The shades of blue you are using remind me of the default anchor colour and the lighting bolt just looks thrown in there from Google images. There's inconsistent spacing between elements so everything looks slightly out of place. Perhaps throw in some varied colours, look into typography, clean up the spacing, etc. Also I'd suggest looking at other websites that use a lighting bolt in the design, to see how you can better blend it in without it looking so constraint. Perhaps placing a very subtle picture of lightning in the background (not stretched or repeated though) would work better? Functionality wise, it's pretty straight forward.. But is custom Google search really needed for 4 pages? Hope this helps.
  3. Edit: Bugger! Not doing great today. Try: $stmt->bind_param('ss', $post['name'], $post['comment']);
  4. You need to leave the NULL in there, or you'll be inserting (or trying) into the first two fields. I modified my original post so you may not have seen it. You're trying to bind 3 variables to the prepared statement, when you only have 2 parameters to bind to.
  5. I don't know if Dreamweaver's capable of connecting to MySQL servers? Edit: my bad, apparently it can. You just need to run that SQL query.. http://www.siteground.com/tutorials/dreamweaver/dreamweaver_mysql.htm
  6. Edit: You're trying to bind 3 variables when there's only 2 question mark params.
  7. A query like this should do the trick: update suppliers set suppliers.image = ( select fulldata.image from fulldata where fulldata.m_prod_id = suppliers.m_prod_id ); Why would you need to store the image twice though? That's twice the work to insert/update/delete just 1 image.
  8. That is a table..
  9. NaN signifies "Not a Number". Could you post the relevant code?
  10. It's a notice informing you that you're trying to access an array index that doesn't exist. // bad echo $array['index']; // good if (isset($array['index'])) { echo $array['index']; }
  11. Replacing the $x and $y vars in my example should be what you need.
  12. Could you elaborate on this a little more?
  13. Try a print_r on the $_SESSION array to check what's in there.
  14. You could use something along the lines of: if ($test1 > $x && $test1 < $y) { echo '<img src="blueicon.jpg" />'; } else { echo '<img src="redicon.jpg" />'; } However for something like this you may be better off using the ternary operator (scroll down to example 2): <img src="<?php echo ($test1 > $x && $test1 < $y) ? 'blueicon.jpg' : 'redicon.jpg'; ?>" /> Edit: not sure given your original description and Wolphie's reply, which numbers you want to compare..
  15. imagecreatefromjpeg() only returns false if it cannot create the image, it doesn't throw a fatal error. Verify the $img path actually exists and that $original isn't false after the call. I think the real problem lies with your method of calculating the src_x and src_y parameters though. Try removing the "* 4" part of each. You may want to round the result too..
  16. He's set the header to HTML. Try changing <style> to <style type="text/css">.. "type" is a required attribute so the client or your browser may not be rendering the style sheet correctly.
  17. Yeah mine is pretty big... By that are you referring to yourself or the tagret website's owner(s)? I fail to see how you scraping their website content makes anything better for them. The only thing you do is use their content to improve your own traffic... whilst adding annoyance to their users for being forced to go through some extra, completely unnecessary website just to see what they wanted. Update Fair enough you may have some-what decent intentions, but that doesn't change the fact that you crawling their website could easily cause them performance issues, whether you meant to or not.
  18. I don't think you've explained what you're trying to acheive clear enough. You want a series of functions you can inlcude to perform repetitive queries?
  19. Security like that is put in place to stop you doing what you're doing.
  20. ...Rotating text? I don't see any. Do you mean the slider type thing?
  21. You shouldn't be using $HTTP_GET_VARS and $HTTP_POST_VARS, they were deprecated as of PHP5.3. Instead use $_GET and $_POST, quite possible your server has "register_long_arrays" disabled.
  22. Without having looked too much into your code, are you aware of the className property? If you're only using a single class name for each element then it's extremely simple to switch between, but even with multiple it's just a case of some simple string substitution.
  23. You could just use JavaScript's reset() method.
  24. Spelling error in your variable: $orignal
  25. What data type is the "lastaccess" field?
×
×
  • 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.