hii again

sorry i ask much

but i need help and i learn

this my error massage:: Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\admin\logink.php:9) in C:\xampp\htdocs\admin\logink.php on line 24





if (isset($_POST['userName']) && isset($_POST['password'])) 

        $userId = $_POST['userName'];
        $password = $_POST['password'];

        if ($userId=="XXXX" && $password =="XXXX")


          print("<p>invalid user name or passwoerd<p>");




<!-- check if the input file is empty -->

<table align="center">

<form name = "login" method="post"  action="logink.php" >

<div align="center">User name:
    <input name ="userName" type="text" size="25"/> 
    <br />

<p align="center"><lablel>Password:
  <input name ="password" type="text" size="25"/> 

<p align="center">

<input type="submit" value="login"/>






Edited 3 Years Ago by happygeek: fixed formatting

the reason you are getting this error is because all headers must be sent before anything is displayed. moving the php code to the top of the script may take care of your problem.

thank u very very much ProfessorPC

:) :)

it works now

This question has already been answered. Start a new discussion instead.