Jump to content

ParkerShannon

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by ParkerShannon

  1. How do I get the value of a variable to display in an HTML table:

        <tr>
          <td>Anarchist</td>
          <td>$anarchistyes</td>
          <td>$anarchistno</td>
          <td>$anarchisthuh</td>
        </tr>
        <tr>
          <td>Conservative</td>
          <td>$conservativeyes</td>
          <td>$conservativeno</td>
          <td>$conservativehuh</td>
        </tr>

    Thank you . . .

  2. WTF is wrong with this php code? I run this and nothing (see below for image of MySQL SQL results).

    <!DOCTYPE html>
    <html>
      <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>TITLE</title>
        <meta name="author" content="Parker Shannon">
      </head>  <body>
          <!--?php         
    // Declare Connection Variables          
            $servername = "mysql408.discountasp.net";    
            $username = "0140496peoplesp";
            $password = "uhuhuhuhuhu";    
            $dbname = "MYSQL5_1014730_peoplespoll";
    // Create connection
      $conn = mysqli_connect($servername, $username, $password, $dbname);
        echo "Connected";
    // Select items from table
        $row = "SELECT id, issue FROM question WHERE id=1;
        $result = mysqli_query($conn, $row)
       echo "id: " .  $result["id"] .  "Issue: " .  $result["issue"] . ;
    // Close database mysqli_close($conn);    
        echo "Disconnected";
            ?>
      </body>

    sql.jpg

×
×
  • Create New...