Dev_Isos Posted March 1, 2006 Share Posted March 1, 2006 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 GETnow 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=value2I am doing this with smarty:[code]{* =============== 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*}{* ---------------- *}[/code]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=1at 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 Quote Link to comment Share on other sites More sharing options...
Dev_Isos Posted March 4, 2006 Author Share Posted March 4, 2006 heloooooooooooooooo ... can I please get some help? Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted March 4, 2006 Share Posted March 4, 2006 [code]<?reset($_SERVER['argv']);do { $newheader.=current($_SERVER['argv'])."&";} while(next($_SERVER['argv']));?><FORM ACTION="<? echo end(explode("/",$_SERVER['PHP_SELF']))."?".$newheader; ?>" METHOD="GET">[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.