Home > Mobile >  Parse error: syntax error, unexpected '$c' (T_VARIABLE) in /home/runner/registration/index
Parse error: syntax error, unexpected '$c' (T_VARIABLE) in /home/runner/registration/index

Time:05-02

I am making a signup form in replit , I have completed coding but it's giving and error Parse error: syntax error, unexpected '$c' (T_VARIABLE) in /home/runner/registration/index.php on line 14

Code is given below

    <?php 
if(isset($_POST['submit']))
{
  $username = $_POST['username'] ;
  $password = $_POST['password'] ;
    $email = $_POST['email'] ;
      $file = fopen("data.txt" , "r") or die ("file not open")

$r = "Username is" .$username. "Password is" .$password. " " ;

fputs($file , $s) or die ("data not got") ; 

fclose($file);
}
      ?> 
    

CodePudding user response:

$file = fopen("data.txt" , "r") or die ("file not open")

no semicolon

  • Related