Raised This Month: $ Target: $400
 0% 

Submit button doesn't work.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 09-26-2011 , 16:20   Submit button doesn't work.
Reply With Quote #1

PHP Code:
<form name="minus" class="form" method="minus">
    <input type="submit" align="left" value="-">
</form>
<form name="plus" class="form" method="plus">
    <input type="submit" align="right" value="+">
</form>

<?php 
if($_SERVER['REQUEST_METHOD']=='minus')
{
    if(
$warnings 0)
        
$query="UPDATE `players` SET `player_warnings`=player_warnings-1 WHERE `player_ip`='".$ip."'";
                                
    
$url "Location: admin.php";
    
header($url);
    
$result=mysql_query($query) or die(mysql_error());
}
if(
$_SERVER['REQUEST_METHOD']=='plus')
    {
        if(
$warnings 4)
            
$query="UPDATE `players` SET `player_warnings`=player_warnings+1 WHERE `player_ip`='".$ip."'";
                                
    
$url "Location: admin.php";
    
header($url);
    
$result=mysql_query($query) or die(mysql_error());
}
?>
Please help ! What is wrong here. Because it doesn't work.
reinert is offline
8088
Veteran Member
Join Date: Jan 2008
Old 09-27-2011 , 18:01   Re: Submit button doesn't work.
Reply With Quote #2

http://www.w3.org/TR/html4/interact/...html#h-17.13.1
The only valid methods are post and get, you can't make up your own. Using an HTML validator would've pointed that out.

Also, the Location header has to be an absolute URI (as opposed to your relative URI) as per the specs. This is not the reason why your form doesn't work, but it's important nonetheless.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode