AndyB
-
Posts
5,465 -
Joined
-
Last visited
Never
Posts posted by AndyB
-
-
$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.
-
And you get all that without the hang-over
-
... displays very strangely ...
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?
-
You could try backticking the table and fields as sometimes that causes the problem (it did cause me a problem once or twice) ...
Was there something in my post about reserved words that was so unclear you needed to reiterate the advice?
-
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.
-
Show us the code you are presently using and unambiguously give us an example of the date format you are using.
-
I have no knowledge of any php.
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.
-
I noticed that if someone uploads an html file renamed .gif it allows them to upload it, and it works like a website, how can I run a check in php to see if it's really an image.
Use the getimagesize() function - it only works with images
-
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.
-
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
-
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.
-
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.
-
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.
-
Your question is pretty vague. What's a button?
Maybe this will help - http://www.w3schools.com/css/css_background.asp
-
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.
-
You'll find spending a few minutes at http://www.tizag.com/mysqlTutorial/ will solve a lot of future problems for you.
-
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/
-
echo "Database updated with: ".$id."".$first_name."".$last_name." ;
s/b
echo "Database updated with: ".$id." ".$first_name." ".$last_name;
-
By the way; what's your opinion on Fox News?
... sometimes referred to as Faux News
-
That's because you do not have a field in your database table with exactly that name.
-
Will that work?
No. Look at the logic and see what happens if item1_price is 8.95.
-
-
Your query defines seven fields and eight variables. companyname got omitted from the fields list. The fix should be obvious.
-
in_array() might be helpful -> http://ca.php.net/manual/en/function.in-array.php
Mysql Issue --- Sudden Breakdown
in MySQL Help
Posted
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