اطلاعیه

Collapse
No announcement yet.

اشکال در مورد این کد

Collapse
X
 
  • Filter
  • زمان
  • Show
Clear All
new posts

  • اشکال در مورد این کد

    سلام دوستان نمی دونم مشکل این کد چیه که تو line 38 بهم گیر داده

    کد PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <?php
     
    include 'MyTools.php';
     if (isset (
    $_POST["tfuser"]))
     {
     
    $_username $_POST["tfuser"];
     
    $_password $_POST["tfpass"];
     
     
    $ServerName "localhost";
     
    $Port "3306";
     
    $DBName "portal";
     
    $User "root";
     
    $Pass "";
     
     
    $link mysql_connect($ServerName.";".$Port,$User,$Pass);
     
    mysql_select_db($DBName,$link);
     
    $sql="select * from administration where username='$_username' and password='$_password'";
     
    $result mysql_query($sql,$link);
     if(
    mysql_fetch_assoc($result))
     {
     
    // go to main page
    print( Rdirect ('Main.php') ); 
    }
    else
    {
     
    //back to login
    print( Rdirect ('login.php') ); 
    "}"
    ?>
    </body>
    </html>

    ممنون می شم اگه کمک کنید دوستان


    فرزند هنر باش نه فرزند پدر که هنر زنده کند نام پدر

  • #2
    حامد جون منتظر ایم


    فرزند هنر باش نه فرزند پدر که هنر زنده کند نام پدر

    Comment


    • #3
      انتهای شرطی که در خط 11 شروع کردی رو مشخص کن و در خط 35 کوتیشن ها رو پاک کن و { بدون کوتیشن بنویس .

      Comment


      • #4
        کد PHP:
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
        </head>

        <body>
        <?php
         
        include 'MyTools.php';
         if (isset (
        $_POST["tfuser"]))
         {
         
        $_username $_POST["tfuser"];
         
        $_password $_POST["tfpass"];
         
         
        $ServerName "localhost";
         
        $Port "3306";
         
        $DBName "portal";
         
        $User "root";
         
        $Pass "";
         
         
        $link mysql_connect($ServerName.";".$Port,$User,$Pass);
         
        mysql_select_db($DBName,$link);
         
        $sql="select * from administration where username='$_username' and password='$_password'";
         
        $result mysql_query($sql,$link);
         if(
        mysql_fetch_assoc($result))
         {
         
        // go to main page
        print( Rdirect ('Main.php') ); 
        }
        else
        {
         
        //back to login
        print( Rdirect ('login.php') ); 
        }
         }
        ?>
        </body>
        توی همون بستن شرط ها مشکل داشتی
        شرط اولی رو نبستی
        دومی هم تو " الکی بود

        Comment

        Working...
        X