Jump to content

jordi72

Member
  • Content count

    13
  • Joined

  • Last visited

About jordi72

  • Birthday 05/09/1997

Contact Methods

  • Skype
    jordi.ererret

Profile Information

  • Gender
    Male

Recent Profile Visitors

364 profile views
  1. sure!
  2. Ok, guys, I just found the problem, the last } just deleted and working fine, now just need a cool CSS.
  3. No, just the blank screen.
  4. Hello, I'm a bit new coding PHP, I'm trying to make a page to see the server status (not real servers) I just got a DB with this structure: https://prnt.sc/huch18 And I just want to set flags like a check or X depending on the Disponibility of the server, obtained from the DB using this code: <html> <head> <title>testing php </title> </head> <body> <?php $link = @mysqli_connect( 'localhost', 'root', '12345', 'admin'); if(!$link){ echo '<p>Error al conectar con la base de datos: ' . mysqli_connect_error(); echo '</p>'; exit; } $servers = ("SELECT * FROM servers"); $query = mysqli_query($link, $servers) or trigger_error($link->error."[$servers]"); echo "<table>"; while($row = mysqli_fetch_assoc($query)){ $serverName = $row['nom']; $serverDispo = $row['disponibilitat']; $serverPopu = $row['poblacio']; $serverQue = $row['cua']; echo "<tr><td>".$serverName."</td><td>".$serverDispo."</td><td>".$serverPopu."</td><td>".$serverQue."</td></tr>"; } mysqli_free_result($query); echo "</table>"; } ?> </body> </html> I know I'm not setting the flags, I just want to get the table with results. And this is the result: https://prnt.sc/huckqk Maybe I'm making a noob mistake but I need help ;(
  5. Thanks for sharing!
  6. inactive

    I checked it, all the info its correct, i write the new line with "or die..." and nothing, the same error, you can check it out at: tigalsoft.tk/login.php
  7. inactive

    The error is that when i put it on the server where is the db, the page looks blank, few hours ago i used a php error checker, and it says the error its on the last line, if i delete the last line the error persist on the last line, and this forever.
  8. inactive

    Hello guys, i'm new on the php world, and i'm developing a website, and on the login page i got a error, but i can't found that, so i need you guys, because i'll become crazy to found that. Thank you guys {CODE SECTION} <?php // Configura los datos de tu cuenta $dbhost='localhost'; $dbusername='user1'; $dbuserpass='123456'; $dbname='testtable'; session_start(); // Conectar a la base de datos mysql_connect ($dbhost, $dbusername, $dbuserpass); mysql_select_db($dbname) or die('Cannot select database'); if ($_POST['username']) { //Comprobacion del envio del nombre de usuario, password y pin $username=$_POST['username']; $password=md5 ($_POST['password']); $pin=md5 ($_POST['pin']); if ($password==NULL) { echo "<center>'La password no fue enviada'</center>"; }else{ if ($pin==NULL) { echo "<center>'El Pin de Seguridad no fue enviado'</center>"; }else{ $query = mysql_query("SELECT username,password,pin FROM users WHERE username = '$username'") or die(mysql_error()); $data = mysql_fetch_array($query); if($data['password'] != $password) { echo "<center>'Login incorrecto'</center>"; }else{ if($data['pin'] != $pin) { echo "<center>'Login incorrecto'</center>"; }else{ $query = mysql_query("SELECT username,password,pin FROM users WHERE username = '$username'") or die(mysql_error()); $row = mysql_fetch_array($query); $_SESSION["s_username"] = $row['username']; header("Location: noticias.html"); } } } ?> <link href="css/estilo.css" rel="stylesheet" type="text/css"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <body> <center> <h1>Login Usuario</h1> <form action='login.php' method='POST'> <table style='border:1px solid #000000;'> <tr> <td align='right'> Nombre de usuario: <input type='text' size='30' maxlength='25' name='username'> </td> </tr> <tr> <td align='right'> Contraseña: <input type='password' size='30' maxlength='25' name='password'> </td> </tr> <tr> <td align='right'> Pin de Seguridad: <input type='password' size='30' maxlength='8' name='password'> </td> </tr> <tr> <td align='center'> <input type="submit" value="Login"> <input type="reset" value="Borrar"> </td> </tr> <tr> <td align='center'> <center><font class="content">[ <a href="registro.php">Registrate</a> ]</font></center> </td> </tr> </table> </form> </center> </body>
×