Jump to content

sqlnoob

Members
  • Posts

    173
  • Joined

  • Last visited

Posts posted by sqlnoob

  1. OK did that but unfortunately that's not where the problem is, as it's not even displaying an error message when the password is wrong, even though it supposed to.

     

    the problem is somewhere in here:

     

    <BODY><H1>Persons Table</H1>

    <P><A HREF="index.htm">return</A>

    <P><FORM method="Post" action="persona.php"> <INPUT type="password" size=5 maxlength=5 name="viewcheck">
    <INPUT type="Submit" value="view" name="submit"> </FORM>
    <P>
    <?php
    if ("view" != $submit) {
    echo "need to submit password to view the table";
    }
    else {
    $passcheck = $_POST['viewcheck'];
    
    if ($passcheck == eling)
    

    {

    $con = mysql_connect("localhost","shugonl","wZ7cEBx6");

    if (!$con)

      {

      die('Could not connect: ' . mysql_error());

      }mysql_select_db("shugonl", $con);

     

    $result = mysql_query("SELECT * FROM persons");

     

    while($row = mysql_fetch_assoc($result))

      {

    echo $row['Password'] . " " . $row['Clan'] . " " . $row['Username'];

    echo "<BR/>";

      }

    }
    else {
    echo "incorrect password";
    }
    

     

    }

    ?>

  2. well I managed to solve the problem with the second page. Turns out the column name in the table was wrong.

     

    but the first page still doesn't work. No matter what I try it just doesn't work. It will not get the POST password after I submit it to itself.  :(

     

    So please help if you can, cause I'm really stuck there.

  3. what kind of errors are you getting?

     

    I'd doublecheck this bit, because no doubt it's hard not to make an error there, like a misplaced semicolon, aphostrophe, or ampersand

     

    print "<meta http-equiv='refresh' content='0;url=http://"."$site"."go.php?n1=$n2&p1=$p2&n2=$n3&p2=$p3&n3=$n4&p3=$p4&n4=$n5&p4=$p5&n5=$n6&p5=$p6&n6=$n7&p6=$p7&n7=$n8&p7=$p8&n8=$n9&p8=$p9&n9=$n10&p9=$p10&n10=&p10=&send=GO"."'>";

    };

     

     

     

     

     

     

     

  4. this is what I use in my site to figure out the difference in days between a made time and the current time

     

    $century = mktime(12, 0, 0, 3, 13, 2008);
    $today = time();
    $timedifference = $today - $century;
    $moddifference = floor($timedifference / 86400);
    

     

    if you replace the $century variable with the time you get from an sql field (one that comes with the post). Then you can get the time that corresponds with the post.

     

    I divide by 86400 for a reason. There are 60 seconds in a minute, 60 minutes in an hour and 24 hours in a day. So 60*60*24 = 86400

     

    So there are 86400 seconds in a day. The $timedifference is the difference in seconds between the two dates, so if you divide it by 86400 you get it in days.

     

    Naturally this is done for only one post. Now all you have to do is figure out a way, to get all the posts you want to check it for and then use an if-else construction to check wether it's a day old or not (or the way you want it to, like 2 days or whatever).

     

    I'm only a noob at this, but I hope this helps you. Best of luck!

  5. oh before I forget to mention I use phpadmin as to ore my sql tables

     

    and the second page I get too from a page with an imagemap of Japan (if that's any help)

     

    and example link in the imagemap will look like this:

     

    <AREA SHAPE="circle" HREF="province.php?province=1" COORDS="542,353,7" ALT="Sado (Sado)">

  6. <HTML>

    <HEAD>

    <TITLE>actions</TITLE>

    <META NAME="keywords" CONTENT="economy">

    <style type="text/css">

    h1,h2,h3,p {font-family: verdana;}

    h1,h2,h3,p {text-align: center}

    body {background-color: #2F7B3A;}

    a:link {color: #80FFFF}   

    a:visited {color: #FF80C0}

    a:hover {color: #FFFF80} 

    a:active {color: #80FFFF}

    </style>

    </HEAD>

    <BODY><H1>Provincial survey</H1>

    <P>

     

    
    
    <?php
    $iprov = $_GET['province'];
    
    if(!filter_var($iprov, FILTER_VALIDATE_INT))
    {
    echo("Integer is not valid");
    }
    else
    {
    $con = mysql_connect("localhost","shugonl","password");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    mysql_select_db("shugonl", $con);
    
    $resultor =  mysql_query ("SELECT * FROM provinces WHERE Identifier ='$iprov'");
    $rower = mysql_fetch_array($resultor);
    
    echo "The province " .$rower['Province']. " is ruled by " .$rower['Owner']. "<BR>The castle is a " .$rower['Castle']. " and the terrain is " .$rower['Machi'];
    
    $rebi = $rower['Attitude'];
    $owni = $rower['Owner'];
    
    $dateresult = mysql_query ("SELECT Taxyear FROM persons WHERE Clan ='$owni'");
    $daterow = mysql_fetch_assoc($dateresult);
    $taxdate = $daterow['Taxyear'];
    
    $thisdate = idate("d");
    
    if ($taxdate == $thisdate) {
    if  ($rebi < 4) {echo "<P>the province is peaceful";}
    else {echo "<P>the province is rebellious";}
    }
    else {
    $taxiresult = mysql_query ("SELECT Taxheight FROM persons WHERE Clan ='$owni'");
    $taxirow = mysql_fetch_assoc($taxiresult);
    $taxi = $taxirow['Taxheight'];
    
    switch ($taxi) {
    case 5:
    $angi = 2;
    break;
    case 4:
    $angi = 1;
    break;
    case 1:
    $angi = -1;
    default:
    $angi = 0;
    }
    
    $newrebi = $rebi + $angi;
    mysql_query("UPDATE provinces SET Attitude ='$newrebi' WHERE Identifier ='$iprov'");
    
    if (rebi == 4) {echo "<P>the province is rebellious";}
    elseif (rebi < 4) {echo "<P>the province is peaceful";}
    else {
    echo "<P>the province is lost to the rebels";
    
    // time calculation als de datum elfde maart dit jaar is
    $century = mktime(1, 0, 0, 3, 11, 2008);
    $today = time();
    $timedifference = $today - $century;
    $moddifference = floor($timedifference / 86400);
    $gameyear = $moddifference + 1477;
    $seasonal = idate("H");
    if ($seasonal == 18 || 19 || 20 || 21 || 22 || 23) {$season = "WIN";}
    elseif ($seasonal == 11 || 12 || 13 || 14 || 15 || 16) {$season = "AUT";}
    elseif ($seasonal == 05 || 06 || 07 || 08 || 09 || 10) {$season = "SUM";}
    else {$season = "SPR";}
    
    mysql_query("UPDATE provinces SET Owner='rebels' WHERE Identifier='$iprov'");
    $messi = $season . " " . $gameyear . " the province of " . $nomprov . " is lost to the rebels";
    
    $countmess = "SELECT * FROM person";
    $countresult = mysql_query($countmess);
    $mrows = mysql_num_rows($countresult);
    $nrows = $mrows + 1;
    
    mysql_query("INSERT INTO Adventures (MessageID, MessageText) 
    VALUES ('$nrows', '$messi')");
    }
    
    }
    
    }
    ?>
    

     

    </BODY>

    </HTML>

  7. <HTML>

    <HEAD>

    <TITLE>Administrator Table</TITLE>

    <META NAME="keywords" CONTENT="administrator">

    <style type="text/css">

    h1,p {font-family: verdana;}

    h1,p {text-align: center}

    body {background-color: #32CD3E;}

    </style>

    </HEAD>

    <BODY><H1>Persons Table</H1>

    <P><A HREF="index.htm">return</A>

    <P>

    
    <?php
    if ("view" != $submit) {
    echo "<FORM method='Post' action='persona.php'> <INPUT type='password' size=5 maxlength=5 name='viewcheck'>
    <INPUT type='Submit' value='view' name='submit'> </FORM>";
    }
    else {
    $passgood = "hello";
    $passcheck = $_POST['viewcheck'];
    
    if ($passgood == $passcheck){
    $con = mysql_connect("localhost","shugonl","password");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }mysql_select_db("shugonl", $con);
    
    $result = mysql_query("SELECT * FROM persons");
    
    while($row = mysql_fetch_array($result))
      {
    echo $row['Password'] . " " . $row['Clan'] . " " . $row['Username'];
    echo "<BR/>";
       }
    
    }
    else {
    echo "incorrect password";
    }
    }
    ?>
    
    

    </BODY>

    </HTML>

     

  8. OK I got a problem with a password checking form on the same page.

     

    Either I'm not fetching the sql table right, or it's not getting the POST variable.

     

    Eitherway I'm supposed to get some data from an sql table or recieve a message that the password is incorrect. Instead I get nothing when I click the submit.

     

    I'm quite new at this, so any help is greatly appreciated. I've been trying to get it to work, by looking at tutorials and walkthroughs, but somehow none are helpful, so that's why I post here.

     

    I have a similar problem with another page, where it just don't seem to be displaying something where it should have.

     

    The first page, is the persona.php page with the problem I just described.

    The second page is one with a similar problem. I can use help with both.

  9. why are you using the connector with variables?

     

    Can't you do it without it that way? I mean just place the name, just place your account and just place your password in the connector, instead of defening it, the way you are doing now.

     

    I mean it's php, not javascript, so you don't have to define the variables.

  10. <?php

     

    if ($con = @mysql_connect('localhost', 'shugonl', 'password')) {

    mysql_select_db('shugonl', $con);

    echo 'connected to the database';

    } else {

    echo 'connection failed';

    }

     

    mysql_select_db("shugonl", $con);

    $sqlpersons = "CREATE TABLE persons

    (

    Password varchar(8),

    Clan varchar(10),

    Username varchar(20),

    Coffer int(8),

    Taxheight int(1),

    Yari int(6),

    Dachi int(5),

    Yumi int(5),

    Daisho int(5),

    Honjin int(2),

    Taxyear int(2),

    Attackp int(1),

    Lastyear int(2)

    )";

    mysql_query($sqlpersons,$con);

     

    $startday = idate("d");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Akita', 'unused', '0', '2', '0', '0', '0', '0', '2', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Amako', 'unused', '0', '2', '0', '0', '0', '0', '44', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Arima', 'unused', '0', '2', '0', '0', '0', '0', '59', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Asakura', 'unused', '0', '2', '0', '0', '0', '0', '18', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Chiba', 'unused', '0', '2', '0', '0', '0', '0', '14', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Chosokabe', 'unused', '0', '2', '0', '0', '0', '0', '56', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Hatakeyama', 'unused', '0', '2', '0', '0', '0', '0', '32', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Hatano', 'unused', '0', '2', '0', '0', '0', '0', '49', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Hojo', 'unused', '0', '2', '0', '0', '0', '0', '13', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Hosokawa', 'unused', '0', '2', '0', '0', '0', '0', '33', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Imagawa', 'unused', '0', '2', '0', '0', '0', '0', '17', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Ishida', 'unused', '0', '2', '0', '27', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Isshiki', 'unused', '0', '2', '0', '0', '0', '0', '50', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Ito', 'unused', '0', '2', '0', '0', '0', '0', '63', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Jinbo', 'unused', '0', '2', '0', '0', '0', '0', '19', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Kikkawa', 'unused', '0', '2', '0', '0', '0', '0', '43', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Kikuchi', 'unused', '0', '2', '0', '0', '0', '0', '61', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Kono', 'unused', '0', '2', '0', '0', '0', '0', '54', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Maeda', 'unused', '0', '2', '0', '0', '0', '0', '22', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Matsudaira', 'unused', '0', '2', '0', '0', '0', '0', '25', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Miyoshi', 'unused', '0', '2', '0', '0', '0', '0', '53', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Mori', 'unused', '0', '2', '0', '0', '0', '0', '37', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Nagao', 'unused', '0', '2', '0', '0', '0', '0', '3', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Oda', 'unused', '0', '2', '0', '0', '0', '0', '28', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Otomo', 'unused', '0', '2', '0', '0', '0', '0', '57', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Ouchi', 'unused', '0', '2', '0', '0', '0', '0', '46', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Shimazu', 'unused', '0', '2', '0', '0', '0', '0', '65', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Shoni', 'unused', '0', '2', '0', '0', '0', '0', '62', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Takeda', 'unused', '0', '2', '0', '0', '0', '0', '9', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp)

    VALUES ('demo', 'Uesugi', 'unused', '0', '2', '0', '0', '0', '0', '11', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Urakami', 'unused', '0', '2', '0', '0', '0', '0', '39', '$startday', '0', '$startday')");

     

    mysql_query("INSERT INTO persons (Password, Clan, Username, Coffer, Taxheight, Yari, Dachi, Yumi, Daisho, Honjin, Taxyear, Attackp, Lastyear)

    VALUES ('demo', 'Yamana', 'unused', '0', '2', '0', '0', '0', '0', '42', '$startday', '0', '$startday')");

     

  11. SETTINGS.PHP

     

    <?php

    $pass = $_POST["userpass"];

    $group = $_POST["player"];

     

    if ($con = @mysql_connect('localhost', 'shugonl', 'password')) {

    mysql_select_db('shugonl', $con);

     

    $tabpass = mysql_query ("SELECT Password FROM persons WHERE Clan='$group';");

     

    if ($pass == $tabpass) {

    $Allowlogin = 1;

    setcookie("person", $_POST['clan'], time()+7200);

    }

    else {

    $Allowlogin = 0;

    }

    ?>

    <HTML>

    <HEAD>

    <TITLE>shugo</TITLE>

    <META NAME="keywords" CONTENT="settings">

    <style type="text/css">

    h1,h2,h3,p {font-family: verdana;}

    h1,h2,h3,p {text-align: center}

    body {background-color: #2F7B3A;}

    a:link {color: #80FFFF}   

    a:visited {color: #FF80C0}

    a:hover {color: #FFFF80} 

    a:active {color: #80FFFF}

    </style>

    </HEAD>

    <BODY><H1>Welcome</H1>

    <P>

    <?php

    if ($Allowlogin == 1) {

    echo "<a href='daimyo.htm'>Continue</A>";

    }

    else {

    echo "incorrect password please try again";

    echo "<BR><a href='index.htm'>back</A>";

    }

     

    } else {

    echo 'connection failed';

    }

    ?>

    </BODY>

    </HTML>

  12. Here is what the files and my table look like:

     

    LOGIN.HTM

     

    <HTML>

    <HEAD>

    <TITLE>SHUGO</TITLE>

    <META NAME="keywords" CONTENT="login">

    <link rel="stylesheet" type="text/css" href="shugostyle.css"/>

    </HEAD>

    <BODY><H1>LOGIN</H1>

    <div align="center"><FORM method="Post" action="settings.php">

    <P>Enter your password <INPUT type="userpass" size=8 maxlength="8" name="password">

    Choose your clan <SELECT size=1 name="player">

    <OPTION value="Akita">Akita</OPTION>

    <OPTION value="Amako">Amako</OPTION>

    <OPTION value="Arima">Arima</OPTION>

    <OPTION value="Asakura">Asakura</OPTION>

    <OPTION value="Chiba">Chiba</OPTION>

    <OPTION value="Chosokabe">Chosokabe</OPTION>

    <OPTION value="Hatakeyama">Hatakeyama</OPTION>

    <OPTION value="Hatano">Hatano</OPTION>

    <OPTION value="Hojo">Hojo</OPTION>

    <OPTION value="Hosokawa">Hosokawa</OPTION>

    <OPTION value="Imagawa">Imagawa</OPTION>

    <OPTION value="Ishida">Ishida</OPTION>

    <OPTION value="Isshiki">Isshiki</OPTION>

    <OPTION value="Ito">Ito</OPTION>

    <OPTION value="Jinbo">Jinbo</OPTION>

    <OPTION value="Kikkawa">Kikkawa</OPTION>

    <OPTION value="Kikuchi">Kikuchi</OPTION>

    <OPTION value="Kono">Kono</OPTION>

    <OPTION value="Maeda">Maeda</OPTION>

    <OPTION value="Matsudaira">Matsudaira</OPTION>

    <OPTION value="Miyoshi">Miyoshi</OPTION>

    <OPTION value="Mori">Mori</OPTION>

    <OPTION value="Nagao">Nagao</OPTION>

    <OPTION value="Oda">Oda</OPTION>

    <OPTION value="Otomo">Otomo</OPTION>

    <OPTION value="Ouchi">Ouchi</OPTION>

    <OPTION value="Shimazu">Shimazu</OPTION>

    <OPTION value="Shoni">Shoni</OPTION>

    <OPTION value="Takeda">Takeda</OPTION>

    <OPTION value="Uesugi">Uesugi</OPTION>

    <OPTION value="Urakami">Urakami</OPTION>

    <OPTION value="Yamana">Yamana</OPTION>

    </SELECT>

    <INPUT type="Submit" value="Login" name="login">

    </form></div>

    </BODY>

    </HTML>

  13. OK I'm a noob at this, but I recently got a website. The SQL tables are in PHPadmin. I've been trying to use a php variable that I get with a POST from a form on a different htm page called login.htm. The php variable I use in a page called settings.php to check wether the person has entered the correct password.

     

    I know the php part is correct in such a way that it doesn't cause syntax error or what else and I also know that I do connect to the sql table.

     

    Somehow though I am doing something wrong and I'm too much of a noob to figure out what I'm doing wrong, so please help me if you can.

     

    -> The WHERE clause for some reason doesn't do anything with my php variable. <-

     

    I know the connector is right, I know the table is right, I know the password is right, yet I still get the wrong echo i.e. it echoes I put incorrect password, when infact I have used the correct one. I also checked wether I've mistakenly misplaced the if-else, but that's not it either.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.