bakraa
01-21-2006, 06:53 AM
hi i am new to php and stuck in this situation please help..
there are two table in my database
i want to display matching fields from one data base tabel to the other in PHP
like there is a colume in [Table A] named (user)
similarly there is a colume in [Table B] named (user)
now if in the user field of [Table A] someone puts G22 i want to see all the rows matching the G22 in the [Table B]
___________________________________________________________________________
[Table A]
----------------------------------
| User | Name | Pass |
------------ ----------------------
| G11 | John | rerr |
| G25 | Smith | rtfr |
| G6 | Tom | wer |
| G30 | Joe | ere |
-----------------------------------
[Table B]
---------------------------------------
| Loss | Amount | User | Profit |
---------------------------------------
| 200 | 5656 | G25 | 78 |
| 300 | 5656 | G25 | 65 |
| 523 | 7878 | G11 | 67 |
| 334 | 6788 | G6 | 55 |
| 665 | 7888 | G30 | 35 |
| 778 | 7878 | G14 | 67 |
| 655 | 4545 | G6 | 88 |
| 544 | 3434 | G25 | 88 |
| 434 | 6787 | G14 | 89 |
| 334 | 3455 | G11 | 89 |
| 343 | 7787 | G30 | 55 |
| 23 | 8787 | G6 | 65 |
----------------------------------------
_________________________________________________
---------------------------------------------------------
User Registration Page.PHP
---------------------------------------------------------
Enter Name : [ Adam ]
Enter Password:[ **** ]
Enter User : [ G14 ]
<Register>
---------------------------------------------------------
________________________________________________
----------------------------------------------------------
User Login Page.PHP
----------------------------------------------------------
Enter Name : [ ]
Enter Password:[ ]
<Submit>
----------------------------------------------------------
_________________________________________________
----------------------------------------------------------
User Info Page.PHP
----------------------------------------------------------
Welcome Adam you are G14
| Loss | Amount | Profit |
-----------------------------
| 778 | 7878 | 67 |
| 434 | 6787 | 89 |
-----------------------------------------------------------
(data related to G14 only )
_______________________________________________________________________________
I hope that I have made my self clear...
I don't need any help regarding the registration or submit of the forms... this is already heppening...
The only problem i am having is in the "User Info Page" where i have to show the information matching the fields.
Thanks !
there are two table in my database
i want to display matching fields from one data base tabel to the other in PHP
like there is a colume in [Table A] named (user)
similarly there is a colume in [Table B] named (user)
now if in the user field of [Table A] someone puts G22 i want to see all the rows matching the G22 in the [Table B]
___________________________________________________________________________
[Table A]
----------------------------------
| User | Name | Pass |
------------ ----------------------
| G11 | John | rerr |
| G25 | Smith | rtfr |
| G6 | Tom | wer |
| G30 | Joe | ere |
-----------------------------------
[Table B]
---------------------------------------
| Loss | Amount | User | Profit |
---------------------------------------
| 200 | 5656 | G25 | 78 |
| 300 | 5656 | G25 | 65 |
| 523 | 7878 | G11 | 67 |
| 334 | 6788 | G6 | 55 |
| 665 | 7888 | G30 | 35 |
| 778 | 7878 | G14 | 67 |
| 655 | 4545 | G6 | 88 |
| 544 | 3434 | G25 | 88 |
| 434 | 6787 | G14 | 89 |
| 334 | 3455 | G11 | 89 |
| 343 | 7787 | G30 | 55 |
| 23 | 8787 | G6 | 65 |
----------------------------------------
_________________________________________________
---------------------------------------------------------
User Registration Page.PHP
---------------------------------------------------------
Enter Name : [ Adam ]
Enter Password:[ **** ]
Enter User : [ G14 ]
<Register>
---------------------------------------------------------
________________________________________________
----------------------------------------------------------
User Login Page.PHP
----------------------------------------------------------
Enter Name : [ ]
Enter Password:[ ]
<Submit>
----------------------------------------------------------
_________________________________________________
----------------------------------------------------------
User Info Page.PHP
----------------------------------------------------------
Welcome Adam you are G14
| Loss | Amount | Profit |
-----------------------------
| 778 | 7878 | 67 |
| 434 | 6787 | 89 |
-----------------------------------------------------------
(data related to G14 only )
_______________________________________________________________________________
I hope that I have made my self clear...
I don't need any help regarding the registration or submit of the forms... this is already heppening...
The only problem i am having is in the "User Info Page" where i have to show the information matching the fields.
Thanks !