| | |
Please help me!!!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2006
Posts: 29
Reputation:
Solved Threads: 0
Good day to all members!
Please help me :cry:
Anybody could help me or could give me a php code.
What I need is I want to put link on each data that I had retrieved through array from mySQL database so that when I'm going to click each of them it will display their additional information. I had tried, but I got always the data in the last row of the table. To be more vivid here is my code:
Table information.
roland-table name
fields
1. name
2. fname
3. email
4. address
5. age
6. b-day
7. tel
8. mobile
code:
$query = "SELECT * FROM roland";
$result = mysql_query($query, $link);
while ($rs = mysql_fetch_array($result)){
//I want to print only these two fields (name, fname)
$name = $rs['name'];
$fname = $rs['fname'];
print("Name: $name $fname");
}
//Output:
Name: Haydee Roy
Name: Rolando Casinillo
Name: Ricky Santos
Now, the output I want to be like these:
Name: Haydee Roy
Name: Rolando Casinillo
Name: Ricky Santos
So that when I'm going to click each of them I will get or display their additional informations.
Any codes relevant to above mentioned you can give are big help for me and I will highly appriated.
More power to this site!
Thank very much in advance....
Roland
Please help me :cry:
Anybody could help me or could give me a php code.
What I need is I want to put link on each data that I had retrieved through array from mySQL database so that when I'm going to click each of them it will display their additional information. I had tried, but I got always the data in the last row of the table. To be more vivid here is my code:
Table information.
roland-table name
fields
1. name
2. fname
3. email
4. address
5. age
6. b-day
7. tel
8. mobile
code:
$query = "SELECT * FROM roland";
$result = mysql_query($query, $link);
while ($rs = mysql_fetch_array($result)){
//I want to print only these two fields (name, fname)
$name = $rs['name'];
$fname = $rs['fname'];
print("Name: $name $fname");
}
//Output:
Name: Haydee Roy
Name: Rolando Casinillo
Name: Ricky Santos
Now, the output I want to be like these:
Name: Haydee Roy
Name: Rolando Casinillo
Name: Ricky Santos
So that when I'm going to click each of them I will get or display their additional informations.
Any codes relevant to above mentioned you can give are big help for me and I will highly appriated.
More power to this site!
Thank very much in advance....
Roland
•
•
Join Date: Oct 2005
Posts: 27
Reputation:
Solved Threads: 0
I don't think I understand what you want. So, I think you want to be able to click on a name and go to a page that has more information? Is that correct? If so, just make a hypertext link for each name that takes the user to a different document that pulls up the more detalied information.
Does this help?
Does this help?
![]() |
Other Threads in the PHP Forum
- Previous Thread: Beginner value transfer across pages
- Next Thread: PHP5 - MySQL Parse error:
Views: 1105 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl customizableitems database date directory display download dynamic echo email error file files folder form format forms forum function functions google headmethod href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail malfunctioning menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





