drummer7771212 Posted October 14, 2011 Share Posted October 14, 2011 im new to programming concepts i need a walk through with this program --can someone please HELP.==================================== Assignment: Create a Visitor Book script to store visitor names and email addresses in a text file. Include the following to allow users to view the visitor book sort the visitor book by name delete duplicate entries (OPTIONAL) You can either use a sticky form format or put the form in a separate HTML file. Heres my html:=========================***********************************************%%%%%%%%%%%%% <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>BookScript</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="Author" content="Armando" /> </head> <body> <form method="BookScript.php" method="post"> <p>Welcome to Book Script</p> <hr> <p> <a href="BookScript.php?action=Sort%20Ascending"> Sort Book List</a><br /> <a href="BookScript.php?action=delete"> Delete Book</a><br /> </p> <form action="BookScript.php?method="post"> <p>Add Book</p> <p>Book Name: <input type="text" name="BookName" /></p> <p><input type="submit" name="submit" value="Add Book to List" /> <input type="reset" name="reset" value="Reset Song Name" /></p> </form> </body> </html> Now here is my php:************************************************ <?php this is where im having problems--i dont know what to do or code it---need help!! i would greatly appreciate any and all help ?> Quote Link to comment https://forums.phpfreaks.com/topic/249123-php-code/ Share on other sites More sharing options...
Pikachu2000 Posted October 14, 2011 Share Posted October 14, 2011 We don't do people's homework for them. Quote Link to comment https://forums.phpfreaks.com/topic/249123-php-code/#findComment-1279328 Share on other sites More sharing options...
titan21 Posted October 14, 2011 Share Posted October 14, 2011 Not even for money?? Quote Link to comment https://forums.phpfreaks.com/topic/249123-php-code/#findComment-1279330 Share on other sites More sharing options...
AyKay47 Posted October 14, 2011 Share Posted October 14, 2011 you have no PHP at all for this? if I see that you have made an attempt at the code.. I will be glad to help.. Quote Link to comment https://forums.phpfreaks.com/topic/249123-php-code/#findComment-1279332 Share on other sites More sharing options...
PFMaBiSmAd Posted October 14, 2011 Share Posted October 14, 2011 You cannot write any code until you have broken down a problem into the individual steps necessary to solve that problem. For any particular action (adding a new entry to the guest book file), have you set down in front of an editor and thought about and made a list of steps you would do to accept the data from the form and save it into a text file stored on a computer? You would then write the code necessary to perform each of those individual steps. For example, one of the steps might be to open and read through the existing content of the text file. You would then make use of the Filesystem function section in the php documentation (or more likely your instructor has covered the instructions he expects you to use) to find what functions exist that allow you to open and read the content of a file. Quote Link to comment https://forums.phpfreaks.com/topic/249123-php-code/#findComment-1279336 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.