![]() |
any PHP guys around? have a question
I'm trying to mess around with script to edit a single row in a table, but for some reason, it wont update.
Anyone help out? p-p-p-please :helpme edit page PHP Code:
PHP Code:
i'll have some paypal sent later this week if someone wants a few bucks, or let me know how i can help you out :thumbsup |
in that 2nd file, you need use $_POST instead of $row, but still I hope you are just playing around and aren't actually planning to use this on a live site, that code is full of holes...
|
Quote:
i changed the $row to $_POST and still not storing in the DB. I changed the file permissions to 777 from 644... any other suggestions PHP Code:
|
id is lowercase in the form, uppercase in your code?
|
add
echo $sql; and see if the line is correct or post it here |
When something isn't working and I can't for the life of me figure out why I usually just start "dieing" stuff out, try:
die($sql) Then you can see exactly what it's telling mysql and copy/paste it into phpmyadmins SQL query box. Haven't used mysql_error() in a while but phpmyadmin will give you some good info about the query if it fails or not. |
Quote:
|
it's probably not connecting to "localhost" use the server name.
|
Quote:
Quote:
here is the output... Code:
UPDATE `ring` SET `value` = '75',`text` = 'blah blah',`image` = 'image' WHERE `ring`.`id` = '' LIMIT 1 |
is ID uppercase in your db table as well or lower?
|
eh nevermind, looks like your not setting the $id variable for some reason. Most likely lowercase/uppercase in your $_POST or form vars.
|
AHHH! figured it out! i'm a knuckle head :winkwink:
had to change PHP Code:
PHP Code:
thanks for the help |
a little echo can save the day
|
All times are GMT -7. The time now is 01:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123