Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About asanti

  • Rank
  1. the markup is in my first post with the actual result. this is my complete .php file <?php require_once ('inc/db.php'); //include_once ('inc/funciones.php'); $display = 10; if (isset($_GET['p']) && is_numeric($_GET['p'])) { $pages = $_GET['p']; } else { $q = "SELECT COUNT(id_aviso) FROM avisos WHERE fecha_moderado IS NOT NULL ORDER BY fecha_creado DESC"; $r = @mysqli_query($dbc, $q); $row = @mysqli_fetch_array($r, MYSQLI_NUM); $records = $row[0]; if ($records > $display){ $pages = ($records % $display == 0) ? ($records/$display) : ceil($records/$display);
  2. thanks for your answer, the second point is clear. The first one i still don't get it. Suppose i have to manually insert users from another database to the actual one with phpmysql. Activate field is blank, users aren't still active, right?, (this is my first php book, thanks for your patience...)
  3. Let me know if i understand you ok, <ul class="pagination margin-none pull-right"> <li class="disabled"><a href="#">«</a></li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">5</a></li> <li><a href="#">6</a></li> <li><a href="#">7</a></li> <li><a href="#">»</a>&
  4. Hi guys, i want to know how can i accomplish this, 1 - manually add an user to the database and activate it 2 - a script to resend the activation code to a user (user didn't receive the email or lost it) Thanks.
  5. i'm using bootstrap, http://getbootstrap.com/components/#pagination 1 is not linked as an <a>? mmm... how can i solve this? i think is related to the php code, could it be?
  6. Hi everyone, I'm on chapter 10 right now, I want to add some style to the pagination using <ul> and <li>, i'm trying this way... if ($pages > 1) { echo '<ul class="pagination margin-none pull-right"><li>'; $current_page = ($start/$display) + 1; if($current_page != 1){ echo '<a href="view_users.php?s=' . ($start - $display) . '&p=' . $pages . '">Previous</a> '; } for($i = 1; $i <= $pages; $i++){ if($i != $current_page){ echo '<a href="view_users.php?s=' . (($display * ($i - 1))) . '&p=' . $pages . '">' . $i
  • Create New...