Jump to content

[SOLVED] php and forms... can a form post/get to a page thats already got ?someid=here


robbins

Recommended Posts

i have a form i want to work, but its on like index.php?page=54  and whenever i submit it, using no action, or using the above listed page as the action, it overrides the ?page=54 and puts its own get data there like ?u7=20... i've tried post but it does the same thing... heres my php code checking it... if ($_POST['u7'] != "130") { stuff here  ... its not the php problem, since it doesn't have a chance to do anything with the form overriding. heres the form i'm using...

  <form method='get' action='index.php?page=54'>
        <select name='u7'>
        <option value='50'>50</option>
        <option value='20'>20</option>
        <option value='0' selected='true'>0</option>
        <option value='-20'>-20</option>
        <option value='-50'>-50</option>
        </select>
        <input value='Submit Points' type='submit'></form>

sooo... how do i post so that php can check the submited data, yet allow it to post to index.php?page=54 ?????  Thanks!
or you could change the action to [code=php:0]$_SERVER['REQUEST_URI'][/code] allthough it may not work. and corbin, should this;

[code=php:0]<option type="hidden" name="page" value="54">[/code]

be this:
[code=php:0]<input type="hidden" name="page" value="54">[/code]
[quote author=ProjectFear link=topic=120604.msg494819#msg494819 date=1167688322]
and corbin, should this;

[code=php:0]<option type="hidden" name="page" value="54">[/code]

be this:
[code=php:0]<input type="hidden" name="page" value="54">[/code]
[/quote]

you win!  thanks much!  lol

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.