Solved

SQL and web pages

Posted on 2002-07-01
8
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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
 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

696 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