This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don't even know what the proper term for it is:
Background info:
Animals Table - animalid, name, photo, achievementname, price, resale, levelid, description
Achievement Table - achievementid, achievementname, photo, xprequired, rewardname, description
Levels Table - levelsid, name, xprequired, description
Rewards Table - rewardid, rewardname, desciption
What I want to do is have my animals.php page pull up the MySQL Animals Table (already done) and have all the animal's achievementsid values link to a new page detailing that specific achievement (achievement.php). In turn, that achievement page would show the rewardid value that would link to a page detailing that specific reward (reward.php)
Example:
Animals.php shows a table with:
1-Horse--horse.png-Yee Haw!-1,000$-250$-1-A horse is a horse of course!
I want Yee Haw! to display as a link that would open up a php page that would show information relating to that specific achievement, ignoring all other achievements.
This would work in the same vein as this website: http://farmville.aweblog.net/almanac/animals/all-animals
I assume in being correct that I would have to call the result of that value into a variable that would be passed on as a cookie to another php file but I have not idea where or how to start on that.
My loop looks like this (shortened due to repetition):
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" .$row['idAnimal']. "</td>";
echo "<td><img src='".$url.$row['photoAnimal']."' height='50px' width='50px'></td>";
echo "<td>" .$row['nameAnimal']. "</td>";
echo "<td>" .$row['nameCategory']. "</td>";
echo "</tr>";
}
Assuming I wanted each animal name to link to a detailed animal page, what would I do? Can anyone give me some pointers or point me to a good resource for this kind of information? Googling is pointless as I don't know what terms I should be using...
Thanks
single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be stored into a single field on the mysql table in the back end. e.gthe user may select red + blue +
How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time somebody enter it.. like this for example any good hint on how to do this?<?phpheader(
C - Reading a file into a byte array
Hi,I'm trying to read a file into a byte array in C. I have to use C as this is for a loadrunner script which is based on the C programming languageThe .Net code from the developers I'm basically
Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 scale. I had someone make a Top Rated section for the site, to show the user with the highest rating
EXplanation help
Hey all,I am still fairly new to PHP programming and I am trying to put together a page where you select search terms from a drop down menu and it keeps the menu at your search choice in the menu
GMail like Chat in ASP.NET
Hi,Can anyone suggest me, how to incorporate GMail like chat in my existing ASP.Net application.I want that all my ownline user should able to chat in(1-1) fashion.Please suggest.Thanks
onClick='location.href=index.htm'> not working
Below is my code:echo "<input type='button' value='redirect' onClick='location.href=index.htm'>";what is wrong with the code?? it's not working
Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this
How to get variable value on next page
Hello friends i am working on payentry page ..there i have this code......... Code: $str="select MAX(PSRN) from paymajor";$result=mysql_query($str) or
Can I call a class inside a function?
I have a class written in another file that handles my image resizing.Can I do this (php says I can't calling a non-existent class), but I know its there becuase the require doesn't fail aboveCode: