Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Everything posted by AndyB

  1. Wild guess. The people who host the site upgraded php to a version which no longer defaults to register_globals ON while the 'working' scripts all assumed that resiter_globals is ON (the insecure setting). Run a simple script to display phpinfo() and that might tell you something
  2. $SQL = "INSERT into item (time,world,category,name,price) VALUES ('".$time_now."','".$world."','".$category."',,'".$name."',,'".$price."')"; If I had to guess, I'd say those ,, ought to be just one comma.
  3. And you get all that without the hang-over
  4. That leaves a lot to the imagination. Perhaps you need to clarify that for us ... or is the source of the text something like an MS Word document with 'smart' quotes and the like?
  5. Was there something in my post about reserved words that was so unclear you needed to reiterate the advice?
  6. desc is a MySQL reserved word. You really shouldn't try to use it as a table or field name. You could wrap it with `backticks` but it's much better practice not to use reserved words. http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
  7. Show us the code you are presently using and unambiguously give us an example of the date format you are using.
  8. Then I suspect that the task of guiding you to success is beyond what folks here are willing to provide. Our concept is that you have some knowledge and have not been able to completely do it alone, so you need a few pointers or help with what seems to be an intractable problem with some code you have created. I think you're a long way from that point. Bottom line - I don't think you'll get what you want here starting from zero.
  9. Use the getimagesize() function - it only works with images http://ca.php.net/manual/en/function.getimagesize.php
  10. Best guess - you're using a varchar field for the date in the database. Much better - use the mysql date format field, with dates in the ISO yyyy-mm-dd format (so you can properly sort, etc. etc.) and display dates in whatever tribal format you prefer.
  11. If you get no errors, then you must have set error display to off. Your query makes no syntactical sense and has more fields defined than data supplied. Time for a tutorial - try www.tizag.com And do yourself a huge favour - set mysql queries to generate errors that make sense and echo the query
  12. AndyB

    css questions

    Answer list: No. You can't. It's my browser, not yours Yes. Yes (write hack-free compliant code) Table tags are for tables. Bonus answer You can find all the answers with a bit of research on your own.
  13. Why don't you echo $update_sql and see what the actual query is? Chance are, it'll be self-evident why it's not doing what you expect.
  14. If your database contains "Hello Todayis Monday" then that's your problem. If your output is actually something from the database and some other words that generate "Hello Todayis Monday", give us a precise example of what you really have.
  15. AndyB

    css buttons

    Your question is pretty vague. What's a button? Maybe this will help - http://www.w3schools.com/css/css_background.asp
  16. We/you need to know how each line of your data separates those variables. Then we can help you with split() or explode() - both in the manual. Give us a sample line.
  17. You'll find spending a few minutes at http://www.tizag.com/mysqlTutorial/ will solve a lot of future problems for you.
  18. Just for the record, the CSS and HTML both validate. Maybe something from here will help -> http://www.cssjuice.com/25-rounded-corners-techniques-with-css/
  19. echo "Database updated with: ".$id."".$first_name."".$last_name." ; s/b echo "Database updated with: ".$id." ".$first_name." ".$last_name;
  20. ... sometimes referred to as Faux News
  21. That's because you do not have a field in your database table with exactly that name.
  22. No. Look at the logic and see what happens if item1_price is 8.95.
  23. http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  24. Your query defines seven fields and eight variables. companyname got omitted from the fields list. The fix should be obvious.
  25. in_array() might be helpful -> http://ca.php.net/manual/en/function.in-array.php
×
×
  • 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.