August 14th, 2000, 01:10 PM
Ok. I have a basic script where the user adds their name, email, product name, and review of the product. Then I have a page that shows all of the entries in order of posted date. Now, I want the script to take the product name, and make a page for it, that pulls that row of the database. Here is the scenario.
Product: Red Balloons
Review: Red balloons are the best. They are red and are really big balloons.
Now, that row will be pulled on the reviews.php page (All variables except the review, which will be a link). reviews_add.php is the form page that posts to reviews_t.php that says thanks.
On the reviews.php page, it shows the author name, email, product, and a link to the product page that PHP will make.
Since the product is red balloons, PHP will make a page called red_balloons.php and will show the author, e-mail, product name, and the full review.
That is the script. If it is unclear, send me an e-mail.
If you can help me, help please. Any input is appreciated. If it can be done easier so that the review is viewed separately, let me know. Thank you in advance!!
August 14th, 2000, 03:52 PM
Here is an update...
Ok. I have a review script where users can type in a review and it will be saved and viewed on a separate page. From a friend I got this scenario.
reviews.php?a=add would be the page to add a review with the form fields of name, email, product, and review
reviews.php?a=view would pull the name, email, and product name as well as a link to the full review (at the following address)
reviews.php?a=view&id=0001 this would be the id number of the review and this page would have the name, email, product, and full review. the sql table would have an auto increment number so that all of the entries will be numbered and can be called
I hope this is clear. I get the concept, but I am no to sure how to set up the reviews.php?a=add part...Do I use If statements? If you could help it would be greatly appreciated! Thanks.
August 15th, 2000, 07:09 AM
make a function for each 'bit' that you want to do
then use the switch() function
so you could do:
#stuff that happnes if the page is loaded with no $a set