PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



Select existing from dropdown or fill in new record -in form

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> MySQL General
View previous topic :: View next topic  
Author Message
GorgeNouri



Joined: 25 Apr 2008
Posts: 1

PostPosted: Fri Apr 25, 2008 1:51 am    Post subject: Select existing from dropdown or fill in new record -in form Reply with quote

Hi, I'm asked to create forms for adding recorded data involving climate research, with many inter-dependencies making the queries somewhat complex. I have to work with PHP Version 4.4.4 and MySQL server version 4.1.18 The budget is quite low, so we can't hire a programmer to build this for us, which is why I was asked to do it. (I already maintain basic html/php and some cms-es etc.)

So far I have only created user-access and emailing forms using php and mysql, working from existing examples, which was easy for me. I understand the basics in most syntaxes if I see them.
But now I bump into a lot of issues that are not so easy to find examples for. I hope someone here could point me to some good examples, or show me an example tailored to the data mentioned below;

One important thing is that they want me to put many form actions on just one page, with one submit button, and even make some values conditional depending on the first entered value in the first form part. They want to have an overview over data that's being added.
(Access control is not an issue, the forms already have access levels arranged via pmwiki actually).

Let me describe the involved structure and actions I need for one of the forms, so maybe someone can help me get on the way;

In an existing MySQL TABLE_X the user needs to add a new record to field_x but I need to check if the record (a 6 digit value) already exists in field_x and if it does, the form needs to show some connected data from other tables and fields below the form entry.
If the record does NOT exist yet (as filled in a textbox by the user), it should of course be added under field_x.
Aside from this, whatever the user has filled in ALSO needs to go into field_y which resides in TABLE_Y and in field_z residing in TABLE_Z (these two adds are hidden from the user).

In the same form-page I then need a dropdown box showing all the records in field_a from TABLE_A, but need to show only those records in the dropdown for which field_b (from the same TABLE_A) has values (record) xx and yy.
At submit the user selected item from field_a should be added as field_h which resides under TABLE_H

If anyone can give me an example, using the above mentioned names, I'd be very grateful. I learn fastest and best working with actual real-life code pieces. I don't know how to best accomplish cross table reading and writing from MySQL in one form field.

I already found some basic examples that were useful for making the connection to the database, which I have working.
Back to top
View user's profile Send private message
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



Post new topic   Reply to topic    WeberForums.com Forum Index -> MySQL General All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum






Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum