• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

SQL and web pages

I wish to put in my database couple products description. When the user click a link I wish to display a page with descriptions stored inside table.

For example when click on 'beer' word the server to read the beer description and to create a page with this informations .

Nick

P.S. I use PHP-Nuke as server
0
ginsonic
Asked:
ginsonic
  • 5
  • 2
1 Solution
 
gizmolaCommented:
It sounds like you want to create a custom php-nuke module.  Modules are relatively easy to write, you simply take the module template code and add in your custom code, then place the module in the php-nuke modules directory.

As to the specific code you want, it's a bit unclear what your application is, but it sounds like you want to create a mysql table in your database, and have your module make queries to it, based on the keyword that people enter in a textbox on your query page.
0
 
ginsonicAuthor Commented:
How can I do that?
0
 
htannouryCommented:
you can create another file for example next.php which have an argument the variable (drink  for example)  that have value beer, ....
in your file you write the link: <a href="next.php?drink=<? echo $drink; ?>">value of the variable to be displayed</a>
In the second file you write a query to retrieve the description of this specific drink in the database:
select description from tablename where drink='$drink';
(this worked if the two variables are in the same table "tablename").
If we have two tables (one for the drinks and other for the descriptions of the drinks), the query should include a join between the two tables.


0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ginsonicAuthor Commented:
Can you direct me step by step ? I'm new on php , in fact is my first project .
For your pacience I will increase to 200 points .
Thanks in advance,
Nick
0
 
ginsonicAuthor Commented:
BTW, I don't have anything now. No tables , nothing else.
0
 
gizmolaCommented:
The first thing you need to do is determine what database php-nuke is installed in, and what the username and password are for it.  This information is set in the config.php file in top level directory into which phpnuke is installed.

Then install http://sourceforge.net/projects/phpmyadmin/ so that you'll have the ability to easily create a new table and do test queries.

In order for me to provide additional help I would need a better description of what you are trying to do.  

Also take a look at http://www.phpnuke.org/
0
 
ginsonicAuthor Commented:
I have already installed phpMyAdmin on my site .

I have a program made by me that contain a table with a  medicine list. Each item have a description ( fields ) for quantity, presentation , utilization ....

When I type the first character on my search edit box the list is locate to the first drug that start with this character and ... for each next character ... until I set my table on desired medicine .

In anothers edit boxes I display the suplimentar informations.

Now I try to do same job but for internet . I wish to let the people to search ( for free ) on my site if the medicine is on my list or not and if it is to read the suplimentar details for this medicine.
0
 
ginsonicAuthor Commented:
no comments ?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now