Hello,
I am quite new to PHP and MySQL. Could anybody please help me with this problem?
Suppose I have a database like this,
[U]Type[/U] [U]Name[/U] [U]Price($)[/U]
A ABC 150
A DEF 350
B XYZ 250
B UVW 450
C .......................
.............................
The user is required to choose the type and enter the budget he can afford, given that he can only buy one of them.
For example, the user chooses type A and enters a budget of 400($). Then I want it to output something like, "You can buy ABC or DEF."
I would like to know how this can be written, roughly.
Please give me a hand, thanks in advance.