ok, I have figured out how to use a class in php and to open a file. The next item i would like to learn if possible is how to write to this file.
here is what i have so far.
index.php:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="processForm.php" method="post">
<input name="exampleText" type="text" />
<input type="submit" value="submit" />
</form>
</body>
</html>
what should i add so that i can write to the file
my file options class
<?php
class fileOptions{
function fileFind($fileName)
{
if(!($myfile = fopen($fileName, "r+[b]")))
{
print ("File could not be opened");
exit;
}
while(!feof($myfile))
{
$myline = fgetss($myfile, 255);
print("$myline <br>\n");
}
fclose($myfile);
}
function fileWrite($fileName)
{
what should i put here i know i need fwrite($myfile), but not sure where to go.
}
}
?>
Start Free Trial