i am facing probelm in this code.this all code is showing in my web page please help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alialiali605
    New Member
    • Jul 2013
    • 1

    #1

    i am facing probelm in this code.this all code is showing in my web page please help

    Code:
    my_query="select * from admin where username='".$_REQUEST['username']."' and password='".$_REQUEST['password']."'"; $login->run_query(); if($login->my_data['Rows'] > 0) { //$_SESSION['USER']=$_REQUEST['username']; $_SESSION['USER']=$login->my_data['Data'][0][1]; $_SESSION['USERID']=$login->my_data['Data'][0][0]; header("Location:deskboard.php"); exit; } else { header("Location:index.php?err=2"); } }	 else { header("Location:index.php?err=1"); } } ?>
    Last edited by Rabbit; Jul 13 '13, 11:44 PM. Reason: Please use code tags when posting code.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    If PHP code is showing in the actual content sent to the browser, there are two possible reasons:

    1) You messed up the PHP block tags. They should always start with either <?php or <?. The shorter version is not advisable, as they aren't always available. Use the longer version!

    2) Your HTTP server is not configured to interpret PHP code. There is no short solution to that. At least now with absolutely no information about your setup.

    Comment

    Working...