Jump to content

Tino

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Tino

  1. Tino

    Newb needing assistance

    Of course. Simply replace all the if, elseif, else, etc stuff with the required switch syntax
  2. Contacting your host is probably your best bet here.
  3. Tino

    Newb needing assistance

    You can make that code a lot easier. Also, it's best practice to store your queries in variables. $con = mysql_connect("localhost","root",""); if (!$con){ die('Could not connect: ' . mysql_error()); } mysql_select_db("stats", $con) or die(mysql_error()); if ($score_compare[1] == $score_compare[2]) { $query = "INSERT INTO `standings` (draw,team1,team2) VALUES ('".$draw."','".$team."','".$team2."')"; $result = mysql_query($query) or die(mysql_error()); } elseif ($score_compare[1] > $score_compare[2]) { $query = "INSERT INTO `standings` (wins,team1,loss,team2) VALUES ('".$wins."','".$team."','".$loss."','".$team2."')";/ $result = mysql_query($query) or die(mysql_error()); } else { if ($score_compare[1] < $score_compare[2]) { $query = "INSERT INTO `standings` (loss,team1,wins,team2) VALUES ('".$loss."','".$team."','".$wins."','".$team2."')"; $result = mysql_query($query) or die(mysql_error()); } mysql_close($con); }
  4. Tino

    Newb needing assistance

    If I'm correct, you can't have whitespace like that in HTML forms, which means you would have to use name="loss" instead of name = "loss". Aside of that, I'd put everything you have after the if condition inside the code block of the if statement, rather than just the connection.
×
×
  • Create New...