1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

error rectification

Discussion in 'PHP' started by barnes, Apr 26, 2007.

  1. #1
    Parse error: parse error in c:\easyphp1-8\www\login.php on line 26 i unable to find this error.
    login.php
    <?php

    $con = mysql_connect("localhost","root","");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    mysql_select_db("user",$con);
    $username=mysql_real_escape_string($_POST['name']);
    $pwd=mysql_real_escape_string($_POST['pwd']);
    if(isset($_POST['name']))
    {
    $q1 = "select username,password from user where username='$username'";
    $r1 = mysql_query($q1,$con) or die(mysql_error());

    while($res=mysql_fetch_array($r1))
    {

    if($res['password']==$pwd);
    {
    echo "your registered sucessfully";


    }
    else
    {
    echo "please register";
    }
    }
    }
    mysql_close($con)
    ?>
     
    barnes, Apr 26, 2007 IP
  2. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there is no semicolon for if. Remove it on line 20
     
    MMJ, Apr 26, 2007 IP