Solved

SQL and web pages

Posted on 2002-07-01
8
226 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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…
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…

707 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

17 Experts available now in Live!

Get 1:1 Help Now