You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 667 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Unable to delete using function [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Sileencer
Nuke Soldier
Nuke Soldier


Joined: Nov 03, 2007
Posts: 10


PostPosted: Sat Nov 03, 2007 1:48 am Reply with quoteBack to top

I'm Unable to delete using a link the link is as follow...

Code:
<a href=\"".$admin_file.".php?op=QuestDelete&amp;questid=$questid&amp;ok=1\">"._YES."</a>


The code is below but basically once I click on yes and refreshes and returned back to the question so in other words skipping the part of deleting..

Code:
 function QuestDelete($questid, ok=0) {

if($ok) {
            $db->sql_query("DELEETE FROM ".$prefix."_quest where questid='$questid'");

            Header("Location: ".$admin_file.".php?op=QuestAdmin");
         } else {
            include("header.php");
            GraphicAdmin();
            OpenTable();
            echo "<center><font class=\"title\"><b>"._QUESTADMIN."</b></font></center>";
            CloseTable();
            echo "<br>";
            OpenTable();
            echo "<center>"._REMOVEQUEST." $questid ";
            echo "<br><br>[ <a href=\"".$admin_file.".php?op=QuestAdmin\">"._NO."</a> | <a href=\"".$admin_file.".php?op=QuestDelete&amp;questid=$questid&amp;ok=1\">"._YES."</a> ]</center>";
            CloseTable();
            include("footer.php");
         }



I'll appreciate any help with this since it is probably something dumb that my noobness can't see.
Find all posts by SileencerView user's profileSend private message
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 556


PostPosted: Sat Nov 03, 2007 3:06 am Reply with quoteBack to top

As the code is currently written, it does not access the database to delete anything. There should be a SQL DELETE statement somewhere...

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
Sileencer
Nuke Soldier
Nuke Soldier


Joined: Nov 03, 2007
Posts: 10


PostPosted: Sat Nov 03, 2007 12:28 pm Reply with quoteBack to top

Sileencer wrote:

Code:

if($ok) {
            $db->sql_query("DELEETE FROM ".$prefix."_quest where questid='$questid'");



isn't this doing the trick??

I know DELETE is spelled wrong i did it to be able to post here on forums...
Find all posts by SileencerView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12313


PostPosted: Sun Nov 04, 2007 12:42 am Reply with quoteBack to top

And where exactly is the QuestDelete function being called?

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Sileencer
Nuke Soldier
Nuke Soldier


Joined: Nov 03, 2007
Posts: 10


PostPosted: Mon Nov 05, 2007 10:09 pm Reply with quoteBack to top

From a link in another function code below

Code:
<a href=\"".$admin_file.".php?op=QuestDelete&amp;questid=$questid&amp;ok=1\">"._YES."</a>
Find all posts by SileencerView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12313


PostPosted: Mon Nov 05, 2007 11:23 pm Reply with quoteBack to top

In the code itself, what calls the function QuestDelete?

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.398 Seconds - 215 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::