Page 1 of 1
Need help updating sql via template form
Posted: 30 Sep 2009, 08:43
by guyb
Re: Need help updating sql via template form
Posted: 30 Sep 2009, 18:20
by Obsidian
Hi there. From what it seems to me, upon firing the SQL query you are using variables that are not set.
Additionally, you are pulling data right from $HTTP_POST_VARS, which is highly insecure and not recommended if you are using phpBB3. You'll want to read this if that is the case:
http://wiki.phpbb.com/Request_var
Re: Need help updating sql via template form
Posted: 30 Sep 2009, 21:18
by guyb
Re: Need help updating sql via template form
Posted: 30 Sep 2009, 21:40
by guyb
Re: Need help updating sql via template form
Posted: 30 Sep 2009, 22:41
by Obsidian
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 07:58
by guyb
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 15:36
by Obsidian
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 15:59
by guyb
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 17:09
by Obsidian
Uhh, not sure what you are trying to do there with the value of the submit button, because submit only returns 1 or 0 for post submission -- value is only the text displayed for the button's visible label.
You may need another hidden input there for the mode.
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 20:26
by guyb
If you were referring to this: "value="{L_ADMIN_AUCTION_OFFER_FIELD_EDIT}"" that's just a preset text variable for the button. This mod uses that approach a lot instead of hardcoding a text phrase in the site pages.
Re: Need help updating sql via template form
Posted: 01 Oct 2009, 22:53
by guyb
Re: Need help updating sql via template form
Posted: 02 Oct 2009, 01:11
by Obsidian
Hmmm...I really don't have enough experience with phpBB2 coding methods, so I would suggest you try going to this site,
http://www.phpbb2refugees.com/
Re: Need help updating sql via template form
Posted: 02 Oct 2009, 16:55
by guyb
Re: Need help updating sql via template form
Posted: 02 Oct 2009, 18:46
by Obsidian
It looks like the second example initializes $mode if the appropriate GET or POST var isn't set anyways, which is actually a smart thing to do (as it is error-proofing that way), however the code itself isn't quite so clean and (if this were in phpBB3) could be a lot easier to read.