Jump to content


Photo

GET CONFLICT


  • Please log in to reply
2 replies to this topic

#1 Dev_Isos

Dev_Isos
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 01 March 2006 - 07:02 PM

I have a GET conflict as I set the method of two forms. one form should select something that should cause the page to load and keep the first form as it is and show another form with the method GET

now I know I can use GET for the first and POST to the second ... but I need the URL to appear as:

index.php?select1=value1&select2=value2

I am doing this with smarty:
{* =============== START DISPLAY ================ *}
{* SELECT PREACHER*}
<tr>
    <td width=5%>
    <FORM ACTION="" METHOD="GET">
        <SELECT NAME="preacher" OnChange="this.form.submit();">
              <OPTION SELECTED > ÇÎÊÑ ÇáæÇÚÙ
          {section name=preacher max=$p_count loop=$preachers }
          <OPTION VALUE="{$preachers[preacher].id_p}" 
                   {if $preacher == $preachers[preacher].id_p} SELECTED {/if} >{$preachers[preacher].preacher}
          </option>
          {/section}
        </SELECT>
    </FORM>
    </td>


{* END SELECT YEAR*}
{* ---------------- *}
{* SELECT DATE *}
  {if $preacher}
    <td width=40%>

    <FORM ACTION="" METHOD="GET">
        <SELECT NAME="year" OnChange="this.form.submit();">
              <OPTION SELECTED > ÇÎÊÑ ÇáÓäÉ
          {section name=year max=$y_count loop=$years }
          <OPTION VALUE="{$years[year].year}" 
                   {if $year == $years[year].year } 
                   SELECTED {/if}>
                   {$years[year].year}
          </option>
          {/section}
        </SELECT>
    </FORM>
    </td>

  {/if}
{* END SELECT YEAR*}
{* ---------------- *}
now as you can see the first form is to select a preacher so after selecting it the URL goes like this: index.php?preacher=1
at the same time the page loads and the second form should appear with to select a year. I need the URL to go like this: index.php?preacher=1&year=2005 ... ofcourse that would display records later according to both of these values.

any help will be appriciated

#2 Dev_Isos

Dev_Isos
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 04 March 2006 - 02:07 PM

heloooooooooooooooo ... can I please get some help?

#3 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 04 March 2006 - 02:35 PM

<?
reset($_SERVER['argv']);
do {
    $newheader.=current($_SERVER['argv'])."&";
} while(next($_SERVER['argv']));
?>
<FORM ACTION="<? echo end(explode("/",$_SERVER['PHP_SELF']))."?".$newheader; ?>" METHOD="GET">





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users