Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con=mysqli_connect("localhost","dbname","dbuser","dbpass");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
- $sql="SELECT * FROM users";
- $result=mysqli_query($con,$sql);
- $rowcount=mysqli_num_rows($result);
- echo $rowcount;
- if($rowcount<=25)
- {
- <<show rest of the edit view code eg $viewdefs ['Users']....... etc >>
- }else
- {
- << show a message >>
- }
- }
- mysqli_free_result($result);
- mysqli_close($con);
- }
- ?>
- <?php
- $con=mysqli_connect("localhost","dbname","dbuser","dbpass");
- // Check connection
- if (mysqli_connect_errno()) {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- } else {
- $sql="SELECT * FROM users";
- $result=mysqli_query($con,$sql);
- $rowcount=mysqli_num_rows($result);
- echo $rowcount;
- if($rowcount<=25) {
- <<show rest of the edit view code eg $viewdefs ['Users']....... etc >>
- } else {
- << show a message >>
- }
- }
- mysqli_free_result($result);
- mysqli_close($con);
- }
- ?>
Add Comment
Please, Sign In to add comment