PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  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
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Sep 25, 2005 11:21 am Reply with quote Back to top

That might be because there is still a form field named "name". You changed the PHP variable to soldierName, but the form field name must also be different. Try it now.
View user's profile Send private message
Donovan
Client


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

PostPosted: Sun Sep 25, 2005 12:10 pm Reply with quote Back to top

All Right....Making progress.

I added a soldier to the roster but it doesn't add unit_id, weapon_id, rank_id

so it will not appear on the roster until I get this working.

I took this from the editsoldier.php page and tried to modify to add soldiers.
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Sep 25, 2005 12:30 pm Reply with quote Back to top

Change these lines:
Code:
   $rank_id = intval($_POST[$rank_id]);
   $unit_id = intval($_POST[$unit_id]);
   $weapon_id = intval($_POST[$weapon_id]);
   $bio = addslashes($_POST[$bio]);

to:
Code:
   $rank_id = intval($_POST['rank_id']);
   $unit_id = intval($_POST['unit_id']);
   $weapon_id = intval($_POST['weapon_id']);
   $bio = addslashes($_POST['bio']);


Also, there is duplicate code for loading the units into the select.
View user's profile Send private message
Donovan
Client


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

PostPosted: Sun Sep 25, 2005 1:04 pm Reply with quote Back to top

Thanks for your help.

Do you know if this would work

Code:

//Insert the values into the correct database with the right fields
   $result = $db->sql_query ("INSERT INTO " . $prefix . "_milpacs_members (uniqueid, name, uniform, rank_id, flag, location, status, p_mos, unit_id,  reports, position, weapon_id, enlistment_dt, icq, bio)".
      "VALUES ('NULL','$soldierName','$uniform', $rank_id, '$flag', '$location', '$status', '$p_mos', $unit_id, '$reports', '$position', $weapon_id, '$enlistment_dt', '$icq', '$bio')");

   if (!$result) {
       echo("<p>Error adding Soldier!" . mysql_error() . "</p>");
   }
//   else {
//      $result = $db->sql_query($sql);
//      echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=modules.php?name=MILPACS&file=roster\">";
//   }

}


I wanted to go to the roster after I submitted but it was going straight to the roster when I first went to the addsoldier.php page.

It's like it doesn't stop on addsoldier but goes straight through to roster.

I commented it out for now.
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Sep 25, 2005 1:21 pm Reply with quote Back to top

It should if you uncomment everything except:
Code:
//      $result = $db->sql_query($sql);

You might also wish to insert
Code:
      die();

after the refresh echo statement to that it doesn't try to reload the screen in the fraction of a second between issuing the refresh and it taking place.
View user's profile Send private message
Donovan
Client


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

PostPosted: Sun Sep 25, 2005 1:31 pm Reply with quote Back to top

I'll do this later...

Thanks for your help Kevin.

Now to revisist my editmedal page and find out why that stopped working.

Smile
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Sep 25, 2005 1:45 pm Reply with quote Back to top

I noticed that admin/editmedalrecord.php changed on 9/13.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Sep 25, 2005 1:48 pm Reply with quote Back to top

I changed the index file to load the editmedalrecord file properly from the admin directory.
View user's profile Send private message
Donovan
Client


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

PostPosted: Tue Sep 27, 2005 8:18 am Reply with quote Back to top

Still didn't help.

After clicking Submit the page refreshes to display medals you added but nothing appears.
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Tue Sep 27, 2005 10:27 am Reply with quote Back to top

So it's not saving the data correctly, or not displaying it correctly?
View user's profile Send private message
Donovan
Client


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

PostPosted: Thu Sep 29, 2005 2:16 pm Reply with quote Back to top

It's not saving the data... ie.. not adding to the table.
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