Hi I have dropdown menus wich contains name of players and opposition team. When user picks team for opposition to play against he clicks the submit button and isset function is triggered where the data from the dropdown menus will be captured and uploaded to the database.
It is simple enough but ive got what I guess is a syntax error. I get the message in the title when page is opened. Ive been trying to fix this with no luck. If someone can point me in the right direction it would be greatly appreciated.
if ( isset($_POST['submit']) ) {
$player_ids = array_map('intval', $_REQUEST['players']);
$opponents_id = $_REQUEST['players'];
var_dump($opponents_id);
$query = 'SELECT `name`, `position`
FROM `player_info`
WHERE `player_id` IN (' . implode(',', $player_ids) . ')';
$return_names = mysql_query($query) or die(mysql_error());
while ( $row = mysql_fetch_assoc($return_names) )
{
$selected[] = $row['name'];
$position[] = $row['position'];
}
$query = ("SELECT `fixture_id`
FROM `fixtures`
WHERE `fixture_id` = $opponents_id");
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($query))
{
$fixture_id[] = $row['fixture_id'];
}
$qury
. In line$result = mysql_query($qury) or die(mysql_error());
– JunM Oct 10 '13 at 5:51