Data Entry Form With Dynamic Dropdown Boxes
I am working on a Form for user to register & enter their info such as name, email, address, tel etc. and I put in a couple of dropdown boxes namely country and city where user can select. I made them dynamic, i.e. the city dropdown is based on the selected value from country and the data retrieved from MySQL database.
The problem I have is the Javascript script involved a reload of the form and once I select a value from Country, the city dropdown populated with data OK but the data entered beforehand (Name, email, etc.) disappeared.
View Complete Forum Thread with Replies
Related Forum Messages:
Three Dynamic Dropdown Boxes
Can any one help me in dynamic drop down creating? I have three dropdowns One for Country one for state and one for location. My plan is to select the country from dropdown according to this i have load the values in state drop down from MySql table. Depending on the state i have to select the location too.
View Replies !
Dynamic Dropdown And Hardcode Dropdown In Select Form
I have plenty of examples of dynamic dropdown choices but none of hardcoded dropdown choices. The ultimate goal is to have a job with various tasks and to track the status of those tasks for a given job. I've used one of the tutorials here to begin the process. Below is the code I have to add work on a given task. Perhaps I actually need to "Update" a job as opposed to "add". But the problem of the moment is I can't seem to hardcode one set of my options. This is the code I have: PHP Code:
View Replies !
Dynamic Fill Form Fields Depending On Dropdown Box
This question has probably already been asked, but let me ask again I have a mysql database to which I connect with my php scripts. The database contains articles. Name, Unit_Price and Reference Now my client needs to order 5 items, click a button and a table with 5 lines and 3 columns appears (until now easy) In the first column is a drop down box with a <select > and <options> in which I store all possible names. I would like than whenever the client changes one of the boxes (in my case there are 5) the Unite_Price column and Reference column in the line he just choose get automatically updated
View Replies !
Php Adodb Data Entry Form Question
i'm new to using php, adodb and pgsql. i have a need to enter data into a database. in general terms, does it go like this... 1. create form on first web page. 2. send form to a 2nd web page via the form's method and action propertise (and submit button). 3. put php the same 2nd web page so that variables are taken from the entry form page and use adodb to perform the insert into the database. 4. have the 2nd web page send the user back to a third page confirming their data entry and offering them the opportunity to add more data. is this correct? what is the best way to do this?
View Replies !
Create A Data Entry HTML Form For Given Table
I am working on a simple web site updating utility for a web site. Rather than hard code the data entry forms, I would like to automactically generate them based upon the table a user selects to update or insert into. What is the best way to approach this? for "insert" should I use the MySQL DESCRIBE table command and build a form element for each field according to its data type? for "update" should I use the DESCRIBE command to build the form as above and SELECT statement to populate each element with data, or should I just use a SELECT statement to retrieve the data and use php to determine the field type and choose an appropriate form element?
View Replies !
Creating Two Drop Down Boxes On My Html Form That Are Populated With Data
I'm interested in creating two drop down boxes on my html form that are populated with data from a mysql database. The data for the first box is course titles and the data for the second is course sections. So far this is no problem. BUT, since the data in both select boxes is related. I would like the user to be able to select either/or and have the other select box automatically pick the associated value from the mysql database.
View Replies !
Multiple Dropdown Boxes
I setup 5 dropdown boxes for user to search data using them individually or combinations of two or more, upto all 5 parameters. This/these parameter(s) is/are then "$_POST" to a mysql_query statement as follows: $s1 = $_POST["dropdown1"]; $s2 = $_POST["dropdown2"]; $s3 = $_POST["dropdown3"]; $s4 = $_POST["dropdown4"]; $s5 = $_POST["dropdown5"]; $query=mysql_query( "Select * from Table Where field1='$s1' and field2='$s2' and field3='$s3' and field4='$s4' and field5='$s5' "); I know this will give me result which fits all 5 parameters only. But I want to get result according to whichever dropdown boxes selected (may be any 1, 2, 3, 4 or all 5) by user. Anyone has any idea how to rewrite the "Select" statement ?
View Replies !
Dropdown Boxes Size
How do you make several dropdown boxes the same size. Not counting >-All-< even that doesnt work good. So is it on this side of the code: <option value="">All</option>"; $Menu .= "</select> "; Or is it on this side: <tr> <td><b>Apples:</b></td> <td colspan=2><?=$Menu?></td> </tr> So to be short how and where do you control the size of the dropdown box?
View Replies !
Selections On Dropdown Selection-boxes
I have a article manager script that im nearly done with and when you press save, it takes you to another page to check that you have entered the required fields by checking for the POST vars, if not it redirects back to the page and stuffs the entered fields into GET vars header( location: file.php?errors=$errors&var1=$var1 ) 's you back to the previous page. Now i have no trouble reshowing the entered info in regular text fields as i grab it from GET but i dont seem to be able to reshow a drop down box selection it always reverts back to the first option when i redirect the page.
View Replies !
Insert Date To Database Using Dropdown Boxes
I be able to insert the date into my database if i have 3 dropdown boxes wherein it contain the month,day & year. i know the basic of inserting data into my database but with this 3 dropdown box i don't have any idea. after submitting, the data selected on these 3 boxes shall be in one field in my database with fieldname Date.
View Replies !
Pass Values Of Dropdown Boxes Into Variables.
I have a form I am creating, it has a total of three drop down boxes the first gets its info from the database the second is just static, and on the second drop down box I have added an on change event which calls a function, like this. <select name="names" id="region" onchange="getregion()" First question is, will that call a function in PHP? Second question is the function I need to write must have the values of the first and second text box, do you have to post this data to pass them into variables?
View Replies !
RegExp - Removing Newline/carriage Return In Data Entry/form Field
I have a database generated calendar (written in php) which puts the contents of one of the fields in a javascript mouseover popup ( Carriage Driving World and select "Calendar" from top menu) which is populated by event organizers entering data via a form. Some people are putting line feeds in their EventDesc (field used for javascript mouseover popup) which screws up the javascript, where linefeeds/newlines aren't allowed. The best solution I can think of is to either remove the linefeeds before the data gets stuffed into the database or when the data is presented to the javascript coding. Here's where I need help. What RegExp string do I use to pull linefeeds/returns? Some of teh entries have more than one which needs removed.
View Replies !
Competition Entry Form / Random Entry Draw Script
I'm looking for an easy method to implement an 'entry form' for an online competition on my website (a competition page, if you like). As I am running a 'trade promotion' I will need to apply for a trade permit license, therefore will need to satisfy the local authorities that the entry form and drawing method are acceptible. The competition page will feature the prize on offer and the fields for entrants to fill in their details. The tricky part I think is that I then require the entries to be able to be 'drawn randomly' once the competition has ended. Any tips here on how to successfully and easily run a competition from your site?
View Replies !
How To Create The Form Boxes And Drop Down Boxes
Im going to create a php form that allows someone to signup to my web hosting site, once they have filled in all the relevant parts and the have selected the hosting package they want and hit the submit button. i want the form to take them to a correct webpage that will allow them to pay for the package that they have selected on the form. I know how to create the form boxes and drop down boxes but i dont know the correct coding to pick up package variableon the last drop down box .
View Replies !
Dynamic Combo Boxes
i have a problem with creating some dynamic combo boxes. i have a form and the user enters the number of printers required, on the recieving page i display that many combo boxes ready for their input...but the problem is its not generating the correct number of combo boxes for some reason. i think i'ts because i need to reset the cursor on the result set so it can whip through the printers again but am not sure. please see following code:
View Replies !
Dynamic Text Boxes
I have a form where field techs can close out service calls, Time in, time out, work done, who the tech is....ect... Currently I have 20 fields for parts..... Part1 / Part1QTY....and so on to Part10 / Part10QTY.... the form emails, and it also feeds data into MySQL... so everything is working fine... What I would like to do, is stream line it...so there is only 2 fields...part_number and qty....and when techs needs to enter more parts then click on a button that creates 2 new sets of text boxes for input.... thus allowing me to have them enter more the just 10 parts and qty's. I thought about, maybe having a secondary form on my HTML page, with different sets of submit buttons, and they can enter 1 part at a time... but I could not get the secondary form Submit button to not clear the data in the primary form...so that didn't work for me.! I'm am basically stuck here... there maybe one or two other issues I have...but those are not so critical. I do have a great deal of MS Access experience but this PHP is a totally different monster. For those who know access, it's very easy to add a new record in a subform and just keep adding records...which is sort of what I'm trying to do here.
View Replies !
Dynamic Listy Boxes
we are trying to buid some dynamic list boxes. Our code that generates the listbox creates a string containing the list box definition and the last line of the file is echo $outstr. When we execute this, the list box works fine. Now when we embed it into am html page in this way: <?php include statuslistbox.php ?>, we get errors that say "constant statuslistbox.php not defined" The listbox define file has the php brackets top and bottom. The embeding html has no brackets other than the ones show above. It seems to make no difference if the calling file is a php extension html extension.
View Replies !
Dynamic Drop Down Boxes
I am trying to figure out how to simulate the onChange() function from JavaScript with PHP. What I am wanting to accomplish is to generate a second drop down select menu based upon the option selected in a first select menu. I know this can be done using $_POST or through data stored in my mySQL database. What I am looking for is a way to generate DROP DOWN 2 on-the-fly when the selection in DROP DOWN 1 is changed (like with the onChange() function available through JavaScript).
View Replies !
Dynamic Select Boxes
I would like to have two select boxes in my form, the options in the second one dependent on the selection made in the first box. However I do not want to have to reload the page to populate the options of the second select.
View Replies !
Dynamic Text Boxes With While Loop?
Basically I have a dynamic number of categories. Each of these categories requires a text box, therefore I have a dynamic number of text boxes. My question is if there is anyway using a while loop that this can be done? <? while ($nextcat = array.php($categories)) { echo $nextcat; $varname = $strip_tags($nextcat) ?> <input type = textarea name = <? $varname ?>> <? } ?>
View Replies !
Dynamic Dependent Drop Down Boxes
I need to build a dynamic page with 2 drop down boxes on it where the contents of the second drop down box are dependent upon the selection made in the first drop down box (the first box contains districts/regions and the second box contains towns/cities). The customer wants this to happen on a single screen but can this be done with PHP?
View Replies !
Dynamic Drop Down Boxes With Php Query
I need to build a dynamic page with 2 drop down boxes on it where the contents of the second drop down box are dependent upon the selection made in the first drop down box (the first box contains districts/regions and the second box contains towns/cities). The customer wants this to happen on a single screen but can this be done with PHP? The above question is already answered by many people and they want me to use Javascript. My doubt is the second box shoud query the list from a table in mysql using php. How do i do that?
View Replies !
Dynamic Drop Down Boxes With Mysql
I'm working on a database project for a class and am having problems populating select boxes with a field from a mysql table. The first thing that I'm trying to do is pull the field LastName from the table Faculty. Then when the user selects the faculty member in the drop down box, it will then display all of the fields related to that faculty member...first and last name, title, office number etc and allow the user to edit those fields and then resubmit them to the database. However I can't seem to get the drop down box to populate, so if anyone has any suggestions as to how to fix this I would love to hear them. Code:
View Replies !
Dynamic Multiple Select Boxes
i m working on select boxes. there are two select boxes one is to select country and other is to select state. when the user selects on country for.ex.US then all the states in US should appear in the second select box(state select box) Code:
View Replies !
Create Dynamic Check Boxes
I have 4 table in MySQL Database:test_2test_3test_4all tables contain 2 field from 4 to 8 record. ok? I want to create dynamic "check boxes" and put MySQL table information into (X)HTML Table with split informaton to 3 column. please download the image and see the (format).
View Replies !
Dynamic Dropdown?
I am posting a code for dynamic dropdown by Leon Atkinson, it works fine but i have a doubt: I tried to add another functionality to it where i got stuck! Once the city also gets selected from the second drop down i wanted that on clicking the submit button it should go to some html page wrt to the city choice. Code:
View Replies !
Dynamic Dropdown Box
im looking to have two drop down boxs one with makes of car and the second drop down box to automatically populate with all the model of that particular make of car. there are about 50 makes and upto 50 models per make. I just would like to know the best way to do this - javascript or use a database? it would be a lot of code todo it in javascript wouldnt it?
View Replies !
Dynamic Dropdown
This may be rudimentary but I'm just trying to get my head around this without having to write a billion lines of extraneous code. I have a dropdown selection list, populated from a mySQL database, containing times in a HH:MM:SS format. The times are 30 minutes interval spanning an entire day, as in 01:00:00, 01:30:00, 02:00:00 all the way to 24:00. I have it entering fine into the database, but when I want to edit this time, I'd like to have the value in the database be marked as the CHECKED value on the dropdown so I don't have to manually re-enter the time for every edit.
View Replies !
Dynamic Entry Style Alternation
I have an admin section where I can update a link exchange. So, there are several entries. Is there a way to alternate styles, like to make the first entry have a gray background, the next have light gray, the next gray and so on. Not so much that exact thing, but that principle.
View Replies !
Dynamic Number Of Text Boxes/insert
On page one I ask 'How many boxes do you want?' and I have a simple form - the code is below: <form action="addhouses.php" method="post"> <input type="text" name="numimages" size="3"> <input type="submit" name="submit" value="Submit"> </form> On the next page I want to display how ever many boxes they said on the previous page. Let's say they choose 4 - there are then 4 boxes which allow you to browse to files on your computer. Clicking submit on this page takes you to the third page which uploads the files and inserts the filenames into the database. Currently the code I have on the third page works fine for a static number of defined boxes. It is: PHP Code:
View Replies !
Using Just One Entry Point For An Entire Dynamic Site
I'm thinking of an architecture for a medium-complexity dynamic site as follows: - I use one php file, say a.php as the entry point for the entire site. PATH_INFO allows me to pass information to my script by using URLs like http://mysite.com/a.php/user1000 or http://mysite.com/a.php/images/10.gif and perform the appropriate action by calling the appropriate function (which may reside in an included php file) - I use apache's url rewriting to redirect urls like http://mysite.com/page25 to a.php b adding the script name - http://mysite.com/a.php/page25 - Using Smarty to control the actual HTML output. This seems to me like a sound and obvious way to do things (and also rarely done) so my questions are: - Has anyone on this group tried to do or done something like this before, using one entry point for the entire site for maximum control? - If so, what do you think are the pros and cons or this approach?
View Replies !
Dynamic Dropdown Lists
I am recoding a greeting card website. I am using dropdowns as filters for items in a DB, so when the user picks "animals" from the "theme" dropdown, the returned cards all feature animals, and when the user picks "birthday" from the "message" option, the returned cards all feature birthday cards. However, there are some combinations that don't return any results, for example "get well" "floral" cards. Code:
View Replies !
Dynamic Dropdown Menu
with help from the PHP Gurus here, I have a dynamic menu script: PHP Code: <?php $time = time() + 28800; $time_plus2 = strtotime('+ 6 days'); echo '<select name="select">' while ($time <= $time_plus2) { Â Â Â Â echo '<option value=>' . date('l, F d', $time) . '</option>' Â Â Â Â $time = strtotime(date('Y-m-d', $time) . ' + 1 day'); } echo '</select>' ?> how do I now get the days of the week to link to different pages?
View Replies !
Dynamic Content Using Dropdown
I have the following dropdown menu which is populated by content or categories (with catID being the category ID) from the database. What I want to do though is when an item in the drop down list is selected, I want to show dynamic content under it. BTW, I must not emphasize on "dynamic" too much because it may seem like a DHTML thing going on here. For example, if a user selects a certain item/category in the list, I want content such as coupons in the DB which have the same catID as the category selected showing up. The coupons are discreetly placed in the DB table "coupons" with the category ID being catID and...for eg: catID --- couponname --- couponinfo --- expiredate If you are going to include any kind of javascript, please write them as well. Here is the code I am starting off with: =========================== <form name="myform"> <select name="selectID" size=10 > <? $resultcat = mysql_query("SELECT * FROM Category"); while ($myrow2 = mysql_fetch_array($resultcat)) {?><?printf("<option value=%s>%s</option>", $myrow2["catID"],$myrow2["name"]); } ?></select></form>
View Replies !
Dynamic Dropdown Menu Glitch
I wrote this code to dynamically generate an array from files on my server and put it into a drop down menu, but the code cannot be inserted on any page anywhere without it cancelling the loading of the rest of the page. Any ideas? Here is the code: PHP Code: <? $the_array = Array(); $handle = opendir('walrus/strips/.'); while (false !== ($file = readdir($handle))) { Â Â Â if ($file != "." && $file != "..") { $file = substr($file, 0, -4); $the_array[] = $file; Â Â Â } } closedir($handle); asort ($the_array); reset ($the_array);.....
View Replies !
Network Bar, Dynamic, Dropdown Menu
Basically I have a "network bar" that I place on the top of all my sites, which has a dropdown menu box to interlink all my other sites. Basically I would like to really modify this idea out more. Code:
View Replies !
Creating Dynamic Page Based On Dropdown Selection?
I'm using Dreamweaver, but I believe this is a general PHP/MySQL question. I have a table, with 4 fields: id, year, car_make, car_model. The data looks like this: 1 1992 Honda Civic 2 1994 Ford Probe GT 3 1999 Audi S4 4 2002 Porsche 959 On my web page, I have a drop down list that's propogated automatically with the "car_model" field entries which are pulled from that table. So when I click the down arrow, I see Civic, Probe GT, S4 and 959. Code:
View Replies !
If, And, Or Code For Data Entry
I have a drop down box with 'Incomplete', 'Resolved' and 'Complete' as part of my $status variable on a form and a text box called '$datecomp' that passes the data from both variables to a MySQL database. How might I include an 'if' statement where if the drop down selection for variable $datecomp is 'Incomplete' or 'Resolved', an error message is displayed on the data entry confirmation page that requests the user to click their browser 'back' button and enter a date in the 'datecomp' field? I was trying to modify the following code but so far, without any luck. In other words, if 'status' = Complete or Resolved, trigger the error on the confirmation page where a user clicks their back button and either enters a date in the datecomp field OR leaves the drop down box as Incomplete. if (!$datecomp || and $status="Complete" or "Resolved") { echo 'You must enter a DATE for items marked Complete or Resolved.<br />' .'Please click the browser BACK button, fill in a Complete/ Resolved date and try again.' exit; }
View Replies !
Duplicate Data Entry
I have created a webform with numerous textfields, which allows the user to enter data into database table. How do I ensure that they do not enter the same data twice?
View Replies !
Radio Boxes To Display Data
i now know how to display the relevant data a user has selected using drop down boxes and arrays like: <td align="right"><b>Format</b></td><td align="center"><select name="format">' ######################################################################### foreach ($format_arrays as $value) { echo "<option Value="{$value}""; if ($value == $format) { echo 'SELECTED' } echo ">{$value}</option>"; } ######################################################################### echo ' </select> but im not sure how to do the same with radio buttons.
View Replies !
Data Entry + Date/Time
I want the user to register class times. The date of class, time class begins, and time class ends must be registered. How should this be done and what is the best way to ensure a standard format is used?
View Replies !
SUBMIT The Data In The Same Entry Page
I have one page, which is for data entery. Another page that run the SQL insert and stores the data in the database. WORKING: When the data is entered in data entry page and SUBMIT button is pressed then it takes the user to another page which saves the data in the database and shows the message that the data has been entered successfully. PROBLEM: I'd like to do the data saving by the same page upon data entry after pressing SUBMIT. How can I do this job? I would like to have a messagebox saying that the data has been entered, and reappearing the data entry page blank. Code:
View Replies !
|