Hello guys ;)
Im quite new to PHP and i run into a problem. I was given a PHP task to do and its got to be submited by 27th this month in my uni... unfortunately i was not attending any Web programming class as i was so into Java that i have forgot about whole world :( and now im kinda stuck.
The coursework is:
Use a text editor to make a comma delimited text file containing data of properties for sale with the following fields/columns: Postcode, Price(thousands), imagefilename, Visits
(Eg: HA13TP, 250,house1.jpg, 3)
1. Display all property information. The screen display can be any simple and sensible layout. Call the script plist.php.
Important: Read in the file and then access one file line at a time and display each field separately (don=t display the whole line in one go). Within your code you must write a subroutine which takes in a string of delimited text (eg. one line of the comma delimited file input) and gives back then nth item of text found between the commas. In this way you can ask the subroutine to extract the first item 1 (Postcode) and when the result is returned you can display it, then the subroutine should extract the second item 2 (Price) and then display the result, etc. Then loop to get the next text line.
2. Display all property details below a maximum price (the user enters the price in a field on a static web form - the price is read in by the script and used to find the property details as the script reads through the property text file) Call the script maximum.php
3. Allow the user to enter a search term - and the web page will display the full details of all the properties containing the user=s search term included in part of any field value. Call the script psearch.php
4. Display on the screen all details of properties which are below a maximum price entered by the user, and allow a user the option of selecting any of the properties shown (read the property file and for each property shown display the property details in a form with a checkbox next to the property details ). ( available.php )
5. The user intends to visit properties they have selected in part 4. When the form for part 4 is submitted a script should work out which properties have been selected by the user and then add one to the Visits field of the selected property. You must fully understand any code you use.
( visit.php )
I would be very grateful if someone would help me out on this one, perhaps how to even start this thing, and also some nice useful links with some info i could learn from would be great. In fact any help would be appreciated :) !