Undefined index: id line 7
help me please
email me asap at
asmafayaz@hotmail.co.uk
<?php
// Connect to database server
$conn = mysqli_connect("mysql5", "fet12014211", "Milkshake12","fet12014211");
// Show a particular value.
$id = $_GET['id'];
// SQL query
$strSQL = "SELECT * FROM countries where iso_alpha3='" . $id . "'";
// Execute the query (the recordset $rs contains the result)
$dataset = mysqli_query($conn, $strSQL);
if(mysqli_error($conn)){
echo "SQL Error: " . mysqli_error($conn);
}
// Loop the recordset $rs
// Each row will be made into an array ($row) using mysql_fetch_array
while($row = mysqli_fetch_array($dataset)) {
# fetch associative array
while ($row = $result->fetch_assoc()) {
echo '<option value="'.$row["iso_alpha3"].'">'.$row["name"].'</option>';
}
// Write the value of the column FirstName (which is now in the array $row)
?>
<?php echo $row['1']; ?>
<?php echo $row['2']; ?>
<?php echo $row['3']; ?>
<?php echo $row['4']; ?>
<?php echo $row['5']; ?>
<?php echo $row['6']; ?>
<?php echo $row['7']; ?>
<?php echo $row['8']; ?>
<?php
}
// Close the database connection
mysql_close();
?>