Jay77710 Posted December 28, 2007 Share Posted December 28, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/83425-solved-fatal-error/ Share on other sites More sharing options...
teng84 Posted December 28, 2007 Share Posted December 28, 2007 fwrie should be fwrite Quote Link to comment https://forums.phpfreaks.com/topic/83425-solved-fatal-error/#findComment-424429 Share on other sites More sharing options...
Jay77710 Posted December 28, 2007 Author Share Posted December 28, 2007 Thanks so much I can't believe I didn't catch that Quote Link to comment https://forums.phpfreaks.com/topic/83425-solved-fatal-error/#findComment-424430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.