Notice that your form has ateam_id, dteam_id, and tid. But your form uses team_id, I think you need to change that code to $_POST['ateam_id']. I dont know what is being returned, quick way to check , print_r($_POST);
You will need to see whats getting passed in order to tell whats wrong, $_POST is an array and print_r will help to see that array in its entirety.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Mon Dec 18, 2006 6:39 pm
Basically that means that your form is not processing the way you expect it.
Reason: no submit, nothing in the $_POST array.
Solution, I would either put a submit button in the form, this may not be the best and easiest solution for you, so I would make those click links you have, carry the data in order to actually put it in the $_GET array. I dont think sentinel will like that much, so a Call to the requested url might be necessary, then strip out the things like the domain and the file, and split whats left with an explode of the & symbol. Then I would do an process of each object returned. I know the admin section does something similar, I never really looked into it. I would sudjest a new aproach similar to the one I proposed. I hope this is what you need.
I would love to find out how to make a form auto act on close, Shy of Javascript function, I cant think of a way to do that.
Well you lost me on some of that. I have been looking at this for awhile now as has Raven himself. We exchanged quite a few emails but so far cannot figure it out.
I tried to split out the ConfirmAttack to a separate page but I only got the same result.
Would really like to get this working. I am way overdue.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Thu Dec 28, 2006 6:42 pm
If Raven and yourself wouldnt mind, please send me the code, only the base code, forget the nuke part if thats possible. I would like to see how the code is being propogated. Anything submitted should process, but you cant have a form $_POST to another page, then without another form, also post to a second, basically, you cant go from index.html form processed to form.php then redirected to a thankyou.php
By the time It gets to thankyou.php, the $_POST variable will be empty.
If you could send me the base code, Id like to look at it.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Tue Jan 02, 2007 7:17 pm
Donovan, Truly my apologies, I wanted to help on this but to be honest things have gotten so backed up here, I dont think I have time to. Somethings have really hurt my time to work on things. Im sorry but these things came sudenly and had no chance to really prepare. I hope you get this resolved.
I created a function and passed all my values in the ConfirmAttack variable.
My case statement in my index.php reads
Code:
case "ConfirmAttack":
confirmattack($team_id, $ateam_id, $dteam_id, $tid, $ateam_name, $dteam_name, $territory);
break;
and my function written below is
Code:
function confirmattack($team_id, $ateam_id, $dteam_id, $tid, $ateam_name, $dteam_name, $territory, $selectenemy) {
global $module_name, $db, $prefix;
include_once("modules/$module_name/common.php");
$action = "Attack";
$verify = checkstatus($team_id);
if ($verify) {exit();}
$enemy = checkmove($tid, $team_id);
if (!$enemy) {
OpenTable();
echo"<center><h3><b>" . _ATTACKTEAMS. "</b></h3></center><br><br>"
."<center><b><font color=RED size=4> There are no enemy forces positioned on your territory! </font></b></center><br><br>"
."<center><b> Your team is not in a position to attack at this time! </b></center><br><br>"
."<center><b> Move your team to a territory and engage enemy forces! </b></center><br><br>"
."<br>";
CloseTable();
include('footer.php');
}else{
View next topic View previous 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