473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Querying database with form data

I have a form, created with frontpage, and on the form are options a user selects (i.e. length of trip, duration of stay, etc.) ... what I help with is how to create a query based on their choices to return the required information from the access database (i.e. prices) to the web page they are viewing...

Please help and thanks in advance :)
May 12 '07 #1
4 1513
Firstly you need to give more info, a) about your database - details of tables, field names, data types, etc, and b) about your form - field names, input types, etc (maybe post up your html code from FrontPage).

If you want help with this you should also probably show some evidence of having made an attempt at it yourself (see 'Posting Guidlines').

I'm not very familiar with MS Access in terms of using it in conjunction with PHP for websites. I'm not even sure that it's possible. Does anyone know??? I'm not sure how much knowledge you have so apologies if this next bit sounds patronising! When you get PHP to make queries to a database you obviously can't get PHP to click the buttons in Access for you. You have to write commands, e.g. to get all the records where the value of 'column_name' is 'pizza' you would write something like:
SELECT * FROM table_name WHERE column_name="pizza"

Mysql is a very popular 'open source' database application (open source meaning it's free, and is being constantly improved by lots of programmers all round the world (as is PHP)). It is by far the most commonly used database with php. If you get stuck using php with mysql there'll be lots of info available and lots of people with knowledge about using them together (like me!). You can download it from http://dev.mysql.com/downloads/.

You also need to consider where you are going to host your website. And what database applications the web host have on their web server. I can highly recommend these people: www.hostultra,com. Very cheap ($20/yr), very good, and they have mysql and php installed on their server(s).

Good luck
May 12 '07 #2
I have 5 tables

1 - depth - normalized
2 - duration - normalized
3 - location - normalized
4 - type - normalized
5 - all data - denormalized with lookups to other tables and full pricing for each scenario

it is easy to query the table, I just need to figure out how to write the form so that instead of putting data into the table, it is in effect querying the existing table. this can be done either as .asp or .php.. or if someone has some other idea (mysql) or whatever, please let me know.
May 12 '07 #3
ak1dnar
1,584 Expert 1GB
I have 5 tables

1 - depth - normalized
2 - duration - normalized
3 - location - normalized
4 - type - normalized
5 - all data - denormalized with lookups to other tables and full pricing for each scenario
Ok There are five tables with you. Clear. What is the query language that you used for them.
it is easy to query the table, I just need to figure out how to write the form so that instead of putting data into the table, it is in effect querying the existing table.
So you can Create the Database table. now you need to enter the data to tables using form. is that correct?

this can be done either as .asp or .php..
To Enter the records to the Table using PHP post your coding that you made so far. if it is ASP please Post this thread in ASP forum section.

or if someone has some other idea (mysql) or whatever, please let me know.
Please Let us know what you meant from this?
Please Read Posting Guidlines Next time.
May 13 '07 #4
You could use access as a data source. To communicate between php and access you will need to use ODBC.

If you are using a windows host, you should be able to use ODBC straight away - its been pre-configured with php. If you want to use a linux host you have to make sure that ODBC has been configured.

To look at how to use ODBC I recommend the trusted PHP website where there is some sample code to get you started:

http://www.php.net/manual-lookup.php?pattern=odbc

Good Luck
May 13 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hakan Akkas | last post by:
Hello all, I need to build a search engine wherewith users can query huge Xml Documents (+/- 100 MB) in a user friendly way. The searcher shouldn't be aware of the underlying structure of the...
17
by: Dan Koster | last post by:
I have three weeks of history for all user accounts stored in a DataSet (dsAccountsHistory). I want to be able to narrow that data down to one specific user, at runtime, without having to make...
7
by: ndn_24_7 | last post by:
Hello all, I'm trying to run a query to make a report. My database is a incident reporting database. I'm tryng to make a monthy report for incidents. The field I need to query in the date field...
6
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about...
5
by: Shane | last post by:
I wonder if someone has any ideas about the following. I am currently producing some reports for a manufacturing company who work with metal. A finished part can contain multiple sub-parts to...
0
by: roiavidan | last post by:
Hi, I'm having a bit of a problem with a small application I wrote in C#, which uses an Access database (mdb file) for storing financial data. After looking for a similiar topic and failing to...
3
by: MDB | last post by:
I'd normally Google for a question like this, and hope to snag a few examples along with the answer, but this time I can't see to get the keywords specific enough. Or I'd ask coworkers, but...
3
by: Lisa C. | last post by:
I'm using Visual Web Developer 2005 Express Edition with SQL Express and I'm a beginner. I'm developing pages for my churches website which allow users to select attributes for a class (e.g....
2
by: roo | last post by:
Hello all. I am new to asp.net so am writing for some advice. I want to transfer data from a web form containing drop down lists and text boxes, saving the user input, and then use this user...
5
by: sql_er | last post by:
Guys, I have an XML file which is 233MB in size. It was created by loading 6 tables from an sql server database into a dataset object and then writing out the contents from this dataset into an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.