Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

CANT UNDERSTAND WHY THIS ISN'T WORKING

$
0
0

okay so I'm struggling to find what the issue is here the form tags are okay as this is one submit of many in a tournament update form where each match there is two submits for teams and two for scores then a submit button 

 

to save publishing the 1300 lines of code i have added the affected coded 

if($_POST['sub_16_1']){
$teamA_16_1_name=$_POST['teamA_16_1_name'];
$teamB_16_1_name=$_POST['teamB_16_1_name'];
$teamA_16_1_score=$_POST['teamA_16_1_score'];
$teamB_16_1_score=$_POST['teamB_16_1_score'];
mysql_query("UPDATE `teamResults` set `teamAName`='$teamA_16_1_name', `teamBName`='$teamB_16_1_name', `scoreA`='$teamA_16_1_score', `scoreB`='$teamB_16_1_score' WHERE `match`='1' AND `round`='16'");
if($teamA_16_1_score > $teamB_16_1_score){ 
$winner="$teamA_16_1_name"; $loser="$teamB_16_1_name"; }else{ $winner="$teamB_16_1_name"; $loser="$teamA_16_1_name"; }
$text="$winner defeats $loser in the Golden 8 Ball";
mysql_query("INSERT INTO `live-result` (`id` ,`text` ,`type`)VALUES ('' ,  '$text',  'score');"); $response = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array('status' => ''.$text.''));
 mysql_query("UPDATE `teamResults` SET `teamAName`='$winner' WHERE `match`='1' AND `round`='8'");
header("Location: edit-main-team-scores.php");
}

and 

   <tr bgcolor="#999999">
        <td><div align="center">1:
          <input name="teamA_16_1_name" type="text" id="teamA_16_1_name" value="<?php echo"$round_16_1->teamAName"; ?>" />
        </div></td>
        <td><div align="center"><span class="text">
          <input name="teamA_16_1_score" type="text" id="teamA_16_1_score" value="<?php echo"$round_16_1->scoreA";?>" size="4" maxlength="2" />
        </span></div></td>
        <td><div align="center" class="text"><strong>:</strong></div></td>
        <td><div align="center"><span class="text">
          <input name="teamB_16_1_score" type="text" id="teamB_16_1_score" value="<?php echo"$round_16_1->scoreB";?>" size="4" maxlength="2" />
        </span></div></td>
        <td><div align="center">
          <input name="teamB_16_1_name" type="text" id="teamB_16_1_name" value="<?php echo"$round_16_1->teamBName"; ?>" />
        </div></td>
        <td><div align="center">
          <label>
            <input type="submit" name="sub_16_1" id="sub_16_1" value="Update Score" />
          </label>

am struggling to work out why the textfield are submitting blank even though it it submitting the form. please help


Viewing all articles
Browse latest Browse all 13200

Trending Articles