Solved

SQL and web pages

Posted on 2002-07-01
8
227 Views
Last Modified: 2008-03-06
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
Comment
Question by:ginsonic
  • 5
  • 2
8 Comments
 
LVL 4

Accepted Solution

by:
gizmola earned 100 total points
ID: 7135490
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
 
LVL 9

Author Comment

by:ginsonic
ID: 7136799
How can I do that?
0
 

Expert Comment

by:htannoury
ID: 7137223
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
 
LVL 9

Author Comment

by:ginsonic
ID: 7137500
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Author Comment

by:ginsonic
ID: 7137505
BTW, I don't have anything now. No tables , nothing else.
0
 
LVL 4

Expert Comment

by:gizmola
ID: 7138770
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
 
LVL 9

Author Comment

by:ginsonic
ID: 7140685
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
 
LVL 9

Author Comment

by:ginsonic
ID: 7181574
no comments ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now