PHP/Form/File Demo - New Entry

Sorry I can't open a file, something is wrong"; exit; } // Anti spammer filtering $login = htmlspecialchars($login); $password = htmlspecialchars($password); $fullname = htmlspecialchars($fullname); $url ="*****"; // this is the stuff we get from the form, we insert it into an array $input = array ($login, $password, $fullname, $url, $food, $work, $love, $leisure, $sports); // so we can make a big string with tabs between the elements // note that we add a \n (line break) to the end of the string. $output_line = implode ($input, " ")."\n"; // Now open the file (get a file pointer) // We will append to it and therefore use the "a" option $output_stream = fopen($file_name, "a"); // and dump the string into the file $result = fputs ($output_stream, $output_line); // give feedback if ($result) { echo "

Your data have successfully been registered, but we did not use the url (it's sort of thing spammers use)."; } else { echo "

Too bad, the file did not want your data."; } // close the file pointer fclose($output_stream); ?>


See all records on file * Go back to the main page
Importance of $thing:"; echo ""; echo ""; } /* the stuff below could have been done with a for loop, but I was exploring a bit :) */ function dump_scales () { global $scales; reset($scales); do { $scale = scale(current($scales)); echo "$scale\n"; } while (next($scales)); } ?> Please fill in all the following fields. Lies are an option ;)
">
Login:
Password:
First Name + Last Name:
URL of Home Page:


See all records on file * Go back to the main page
D.K.S.