PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
asically when I click on DONE, I want my script to change whatever STATUS is currently to 1. This script just doesn't work though, and I'm not sure what I'm missing here... I didn't include the usual mysql connect stuff.
I'm a bit of a noob so be gentle...
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Your code was written assuming register_globals is turned on when it is not. Rewrite your code (a bit) to not assume register_globals is on.
hint: it'll involve $_POST and $_GET and the other superglobals.
Furthermore, I will suggest that you shouldn't code for short tags being on either. Why? Because they can be turned off and on some servers are, quite readily. (All of my servers have it off, for instance.)
$query = "SELECT id, name, time, notes, runs, user FROM upload WHERE status='0' AND destination='Advertising' ORDER BY id DESC";
$result = mysql_query($query) or die('Error, query failed');
$query = "SELECT `id`, `name`, `time`, `notes`, `runs`, `user` FROM `upload` WHERE `status`='0' AND `destination`='Advertising' ORDER BY `id` DESC";
$result = mysql_query($query) or die('Error, query failed');
backticks, like agtLewis posted is the more correct way. This is due to MySQL not understanding what you say is a field when it is a reserved word that means something else entirely.