almightyegg Posted July 31, 2007 Author Share Posted July 31, 2007 I managed to sort that out but now I've noticed another error... $f and $t are the wrong way around...? Quote Link to comment Share on other sites More sharing options...
Philip Posted July 31, 2007 Share Posted July 31, 2007 Ahh, yeah. I tend to have a few typos =P Well, what do you mean they are the wrong way around? You mean like it should be: delete.php?t=$f&f=$t ? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted July 31, 2007 Author Share Posted July 31, 2007 no it should be delete.php?t=$t&f=$f but it shows delete.php?t=$f&f=$t which is why it can't delete the row because it doesn't exist Quote Link to comment Share on other sites More sharing options...
Philip Posted July 31, 2007 Share Posted July 31, 2007 How is that possible? lol var t = gup(t); var f = gup(f); var url = "delete.php?f=" + f + "t=" + t; Well, maybe switch them here to where it goes: var url = "delete.php?f=" + t + "t=" + f; But, really, solve, not band-aid it Are they correct on the first page (where the JS gets the variables)? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted July 31, 2007 Author Share Posted July 31, 2007 I found the code problem: var t = gup('f'); var f = gup('t'); lol I swap it round Quote Link to comment Share on other sites More sharing options...
almightyegg Posted July 31, 2007 Author Share Posted July 31, 2007 It worked! W00t! CHeers for all the help. Is it the same principal if I want to put a second function in? eg. If I want to PIN it it will pop-up saying are you sure you want to pin this thread. Would I just have to change function names and the delete.php would become pin.php?? Quote Link to comment Share on other sites More sharing options...
Philip Posted July 31, 2007 Share Posted July 31, 2007 lol, nice. yeah, you could do that. Eventually, to save some space within your code, you can use what I did and do a switch, where you would give it like "confirmit(delete)" and then it would do a switch case off of what it was, in this case it would go through the deletion steps. However, that gets a little confusing/messy, so stick with the basics, but keep it in mind later on as you get better (and more comfortable) Don't forget to mark it solved if you think it was fixed 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.