Hello all.
Well I am trying to make a few pages on my site that my family will be able to access which will have 2 forms on it, one for item and one for webpage. I want each of the users to be able to enter information into the two forms and have it save them either to the page or to a seperate document so that each one of us can log on and look at each others wishlist.
I have experience in HTML and javascript however PHP is making me want to rip my hair out. If anyone has any suggestions on how to accomplish this or some ideas that would be terrific.
I was thinking something along the lines of a Guestbook but trimming down the extra info that isn't needed. Ideally I would like to be able to have radio buttons to check and then delete items they no longer want, but for now just being able to add items would be terrific.
Thank you to anyone who can help this extreme newb.
EDIT
OK so I read some more tutorials and I have this so far, seems to be almost exactly what I want. The one thing that I would like to add is a way to remove info from the log file, example remove the 3rd entry of 5 entries so users have a way to delete items.
Also I want to check the users entry for the website, if it is in "http://server.com" format I want to have it create a link (like it does to all now), if it is in "www.server.com", I want it to add the [url]http://,[/url] and if it is in Server format I want it to leave it alone.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<form method="post" action="<?php ?>" target="_self">
<label>Item
<input type="text" name="item" />
</label>
<label for="textfield">Website</label>
<input type="text" name="website" />
<br />
<button type="submit" name="Submit" value="Submit">Submit</button>
</form>
<?php
$w3 = '<a target="_blank" href="'
?>
<?php
$w3end = '">'
?>
<?php
if ($_POST['item'] == '' ){
}
else {
$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'a') or die("can't open file");
$stringData = "-".$_POST['item']."\n"."<br>";
fwrite($ourFileHandle, $stringData);
$url = strtolower($_POST['website']);
$stringData = $w3.$url.$w3end.$url."</a>"."<br>";
fwrite($ourFileHandle, $stringData);
fclose($ourFileHandle);
}
?>
<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
?>
</body>
</html>