Jump to content

Recommended Posts

I get a fatal error when I try to parse my php script for a login script without mysql

 

Fatal error: Call to undefined function: fwrie() in /home/sublimis/public_html/jay/login script/register.php on line 35

 

here's the script

 

<?php

if (isset ($_POST['submit'])) {

$problem = FALSE;

if (empty ($_POST['username'])) {
  $problem = TRUE;
print ("please enter a username!");

}

if (empty ($_POST['password'])) {
  $problem = TRUE;
print ("Please enter a password");

}

if (empty ($_POST['password2'])) {
  $problem = TRUE;
print ("Your password did not match your confirmed password");

}

if ( !$problem )

if ($fp = fopen ( 'users.txt', 'ab' )) {   //Open the file!

$dir = time() . rand (90, 4596);

$data = $_POST['username'] . "\t" . crypt($_POST['password']) . "\t" . $dir . "\r\n";

// Write data and close file!

fwrie ( $fp, $data );
fclose ( $fp );

mkdir ( $dir );

   print ("You are now registered!");

} else {

   print ("You could not be register due to an error");

}


} else {

   print ("Please try again!");

}

?> 

 

any help you can give would be nice

Link to comment
https://forums.phpfreaks.com/topic/83425-solved-fatal-error/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.