Nightseer Posted September 28, 2006 Share Posted September 28, 2006 I am very new to this, and have run iunto a roadblock trying to make my site more secure. The query works like this:[code]mysql_query("UPDATE core SET daysleft=daysleft-1 WHERE core='$core'")or die ('cannot subtract days');[/code]But when I try to add the account owner to it, it stops working. The variable is correct-checked it by having it echo before it tries to query--[code]mysql_query("UPDATE core SET daysleft=daysleft-1 WHERE core='$core' AND ownerid='$mid'")or die ('cannot subtract days');[/code]The way it is now, anyone can subtract days from someone else's account-I could really use some help here ??? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 When you say "stops working", I assume you mean the table isn't updated... Since there's no syntax error, I have to conclude that there are no matching rows. Quote Link to comment Share on other sites More sharing options...
Nightseer Posted September 28, 2006 Author Share Posted September 28, 2006 Figured it out-ownerid wasn't updating right (despite echoing correctly????) Just got it fixed about ten minutes ago:) Thanks for trying! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.