| Code: |
| <?php
$con = mysql_connect("localhost","db_name","db_pass"); mysql_select_db('db_name'); if (!$con) { die('Could not connect: ' . mysql_error()); } echo $_POST["Slot"]; mysql_query("UPDATE Player SET ROSTERPOS = 'Slot'; header('Location:http://ayc.frih.net/WBA/Depth_Charts.php'); mysql_close($con); ?> |
What is wrong with my code? It gives me back a error...
| Quote: |
| Parse error: syntax error, unexpected $end in /home/fizzo/domains/ayc.frih.net/public_html/WBA/rostereditprocess.php on line 12 |
Its part of a Form submission and database update script... heres the other script that will pass the datas thru the above codes..
| Code: |
| <?php
/*---------------------------------------------------+ | PHP-Fusion 6 Content Management System +----------------------------------------------------+ | Copyright © 2002 - 2006 Nick Jones | http://www.php-fusion.co.uk/ +----------------------------------------------------+ | Released under the terms & conditions of v2 of the | GNU General Public License. For details refer to | the included gpl.txt file or visit http://gnu.org +----------------------------------------------------*/ require_once "maincore.php"; require_once "subheader.php"; require_once "side_left.php"; opentable("WBA l "); $con = mysql_connect("localhost","db_name","db_pass"); mysql_select_db('db_name'); if (!$con) { die('Could not connect: ' . mysql_error()); } $TEAM = $_GET['PLAYERID']; $player = mysql_query("SELECT * FROM Players WHERE PLAYERID = '$PLAYERID'"); echo "<b><font size=6>PLAYER CONFIGURATION</font> <tr> <th style=border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium bgcolor=black><font size=1 face=Verdana color=white>PLAYER</th> <th style=border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium bgcolor=black><font size=1 face=Verdana color=white >SLOT</th> <th style=border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium bgcolor=black><font size=1 face=Verdana color=white >CURRENT SLOT</th> </tr></font>"; while($row = mysql_fetch_array($player)) { echo "<tr>"; echo "<td bgcolor=#666666>" .$row['ROSTERPOS']. "</td>"; echo "<td>"."<b>"."<a href=http://www.ayc.frih.net/WBA/PlayerPage.php?PLAYERID=".$row['PLAYERID'].">".$row['FNAME'] . " " . $row['NAME']."</a>" ."</b>"."<br>". "<b>#"."</b>".$row['NUMBER']."</td>"; echo "<td bgcolor=#666666>" ."<form method=POST action=rostereditprocess.php> <select size=1 name=Slot> <option value=0>01</option> <option value=1>02</option> <option value=2>03</option> <option value=3>04</option> <option value=4>05</option> <option value=5>06</option> <option value=6>07</option> <option value=7>08</option> <option value=8>09</option> <option value=9>10</option> <option value=10>11</option> <option value=11>12</option> <option value=12>IR1</option> <option value=14>IR2</option> <option value=13>IR3</option> </select><input type=submit value=Submit name=B1></p> </form>". "</td>"; echo "<td bgcolor=#666666>" . $row['ROSTERPOS'] . "</td>"; echo "</tr>"; } echo "</table>"; //echo "<input type=submit value=Submit name=B1>"; mysql_close($con); closetable(); require_once "side_right.php"; require_once "footer.php"; ?> |
