DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • October 18, 2018, 09:11:41 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: c= disappearing  (Read 2449 times)
0 Members and 1 Guest are viewing this topic.
Mod God
Offline Offline

Posts: 1916

View Profile WWW
« on: April 10, 2005, 01:58:06 AM »

I am having a problem with the c= disappearing from the URL.  i get to this page to enter a user id, and when you hit submit, it takes you to the next step fine, but the c= is missing from the URL, so any nav i click on from there is a badnav.  I atleast assume that is the cause for the badnav, since all other code on the page seems fine.
here is the form.
output("enter the ID of the user you want to view. `n`n");
        $linkcode="<form action='runmodule.php?module=themodule&op=nextstep' method='POST'><input name='acctid' id='acctid'><input type='submit' class='button' value='Submit'></form>";
        $linkcode="<script language='JavaScript'>document.getElementById('bet').focus();</script>";

« Reply #1 on: April 10, 2005, 11:39:17 AM »

No, something else is causing your problem.

c= is added to the addnav() if and only if it goes into the actual navbar.
For internal page links, such as what you are doing with the form submits, they are not added for you.

In fact, I had to manually add it to one link (the commentary refresh link) to prevent cheating, so I know for a fact that it's not that Smiley

That snippet of code should work correctly, so there has to be something else going on.
Global Moderator
Captain of the Guard
Offline Offline

Posts: 104

Game Creator MIGHTYE

View Profile
« Reply #2 on: April 12, 2005, 10:08:09 AM »

The c= *must* be missing at that point, because if you look at what your form action is, it's just "runmodule.php?module=themodule&op=nextstep".  If the game required the &c=xxxx, you'd get a bad nav.  Because the nav subsystem doesn't take care of drawing the actual link here, it cannot append &c= to the end, and so it inserts it into the allowednavs array w/o the &c=.

This code will generate two separate entries in allowednavs:
addnav("Foo","foo.php"); //adds foo.php?c=xxxxx
addnav("","foo.php"); //just adds foo.php

This should, however, not have any affect on subsequent pages getting a bad nav.  C is tracked in the session ($session['counter']).  I use this technique each time any form is posted anywhere in the site.  In fact, we recently had to manually override it for comments to keep users from using the Firefox auto-reloading plugin from keeping the user online unduly.
Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
50 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search