Viewing file: laserno.php (959 B) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /* Attempt MySQL server connection. Assuming you are running MySQL server with default setting (user 'root' with no password) */ $link = mysqli_connect("localhost", "pcclasses_user", "rb!pcc838", "pcclasses_data"); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } // Attempt select query execution $sql = "SELECT lesarno FROM student_admission ORDER BY ID"; if($result = mysqli_query($link, $sql)) { if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)) { $accountnew=$row['lesarno'];
} echo "</table>"; // Free result set mysqli_free_result($result); } else{ echo "No records matching your query were found."; } } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } $laserno=$accountnew+1;
// Close connection mysqli_close($link); ?>
|