PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sun Dec 17, 2006 12:21 pm Reply with quote Back to top

No. When you call the page up that produces the image up above. Do a Page Source and save the source (rendered HTML), zip it up and email it to me.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sun Dec 17, 2006 12:28 pm Reply with quote Back to top

Sent to raven AT ravenphpscripts DOT com
View user's profile Send private message Visit poster's website ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sun Dec 17, 2006 2:01 pm Reply with quote Back to top

I sent you an email back.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sun Dec 17, 2006 7:37 pm Reply with quote Back to top

I Thought I would drop in, and ask something simple.
From your form, you have 3 things named

$ateam_id = $_POST['team_id'];
$dteam_id = $_POST['dteam_id'];
$tid = $_POST['tid'];
$action = 'Attack';

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sun Dec 17, 2006 9:35 pm Reply with quote Back to top

team_id gets passed in from the previous page. That is why I am not using $_POST['ateam_id']

I try to write the value of team_id into $ateam_id

The dteam_id is generated on the Attack page so that is why I am trying to use $_POST with that value.

I'll try the print_r with $_POST and see what happnens.
View user's profile Send private message Visit poster's website ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Sun Dec 17, 2006 9:56 pm Reply with quote Back to top

It returns Array ( )
View user's profile Send private message Visit poster's website ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Dec 18, 2006 6:39 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Thu Dec 28, 2006 12:12 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Dec 28, 2006 6:42 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Thu Dec 28, 2006 7:30 pm Reply with quote Back to top

Here you go.
Only registered users can see links on this board!
Get registered or login to the forums!


This one has a couple functions I call. I thought I would include it.
Only registered users can see links on this board!
Get registered or login to the forums!


I hope this is what you were asking for.
View user's profile Send private message Visit poster's website ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Tue Jan 02, 2007 10:09 am Reply with quote Back to top

I'm gonna try and pass this with a function and insert that way.
View user's profile Send private message Visit poster's website ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Jan 02, 2007 7:17 pm Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Tue Jan 02, 2007 7:21 pm Reply with quote Back to top

Ok.

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{

$result = $db->sql_query ("INSERT INTO " . $prefix . "_eto_tracking (log_id, ateam_id, dteam_id, tid, move_dt, action)".
         "VALUES (NULL,'$ateam_id','$dteam_id','$tid', CURRENT_TIMESTAMP(),'$action')");   

echo "<P><font color=RED size=4><center>Attack Orders Have Been Sent!</center></font></p>";
include_once("footer.php");
}


The end of my form now looks like this.

Code:
while ( $row = $db->sql_fetchrow($sql) ) {
            $dteam_id = $row['team_id'];
            $dteam_name = $row['name'];
            $tid = $row['tid'];
            $territory = $row['t_name'];           
            echo "<tr>"   
               ."<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$dteam_id</font>"
               . "<input type=\"hidden\" name=\"ateam_id\" value=\"$ateam_id\">"
               . "<input type=\"hidden\" name=\"dteam_id\" value=\"$dteam_id\">"
               . "<input type=\"hidden\" name=\"tid\" value=\"$tid\">"                             
               . "<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$dteam_name</font></td>"   
               . "<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$territory</font></td>"
            . "<td align=\"center\" bgcolor=\"#666666\"><input type=\"radio\" name=\"selectenemy\" value=\"\"></td>"
               . "</tr><br>";
    }
   echo"<tr><td><input type=\"submit\" value=\"Attack\"></td></tr>";
   echo"<input name=\"op\" type=\"hidden\" value=\"ConfirmAttack\"\">";


How do I ensure the value of the radio button to be able to insert the correct dteam_id?

I have a dteam_id being written but it is the last in the query. I need it to write the correct one I selected with the radio button.
View user's profile Send private message Visit poster's website ICQ Number
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Tue Jan 02, 2007 9:12 pm Reply with quote Back to top

Got it working.

Code:
while ( $row = $db->sql_fetchrow($sql) ) {
            $dteam_id = $row['team_id'];
            $dteam_name = $row['name'];
            $tid = $row['tid'];
            $territory = $row['t_name'];           
            echo "<tr>"   
            ."<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$dteam_id</font>"
            ."<input type=\"hidden\" name=\"ateam_id\" value=\"$ateam_id\">"               
            ."<input type=\"hidden\" name=\"tid\" value=\"$tid\">"                             
            ."<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$dteam_name</font></td>"   
            ."<td align=\"center\" bgcolor=\"#666666\"><font color=\"#000000\">$territory</font></td>"
         ."<td align=\"center\" bgcolor=\"#666666\"><input type=\"radio\" name=\"dteam_id\" value=\"$dteam_id\"></td>"
            . "</tr><br>";
    }
   echo"<tr><td><input type=\"submit\" value=\"Attack\"></td></tr>";
   echo"<input name=\"op\" type=\"hidden\" value=\"ConfirmAttack\"\">";   
    echo"</table>";
    echo"</form>";
View user's profile Send private message Visit poster's website ICQ Number
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum