Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





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 Complete Forum Thread with Replies

Related Forum Messages:
PHP Dynamic Drop Down Menus, Page Displays Diff Data Depending On Dropdown Selected.
I currently have two drop down menus the first one with countries and then the second one changes depending on which country is selected to display counties.

This works fine, now what I want to do is have it so when it county is selected it shows all the squash clubs that are in that county below the drop downs. Code:

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 !
Fill In Form Fields On PDF
Looking for classes or libraries which allow you to fill in form
fields on a PDF document.

View Replies !
Form Validation :: Alert Users They Have Forgot To Fill Fields
I am having problems figuring out how to do a form validation using HTML and PHP. I create 2 radio buttons, 4 text boxes for name, email, password, and validation string. I then create some other stuff that isn't mandatory to fill out followed by a push button of type="submit".

When the user presses the Submit button, I want to notify them if they forget to fill out the name, email, or password, or if they forget to choose one of the radio buttons or if they type in an incorrect validation string. I do not know how to go about doing this if it is part of PHP or HTML. Code:

View Replies !
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 Replies !
Dynamic Form Fields/multiple Page Form?
It is for a friends out of print booksite, where visitors can request multiple books to be searched by adding one at a time to a cart (javascript), then once all added they submit to another form where they enter their personal details and all is sent through. The problem is at the moment they cannot change whats in the cart without refreshing the browser window and losing everything.

1) present for asking how many books they want to search for
2) display multiple rows of the same input fields depending on how many books they say they want to have searched for?i.e

title|author|publisher|etc
title|author|publisher|etc
title|author|publisher|etc

3) when these are submitted they could see these above the next part of the form where they enter their details with the option to go back and delete/amend.
4) send all the info to my colleague.

if so has anyone seen a similar script that I could take a look @ to see if I can hack it to suit my needs?

View Replies !
Dynamic Form Fields
I want to have it setup so when the user clicks this link a value is sent via get and that value is put through a for loop to generate an additional form field: Code:

View Replies !
Getting Dynamic Form Fields
i have a list of editable form fields that are dynamically created from the records in the database and are named:

$matchNo = "1";
/ loop through database records

<input name="home_score_<? echo $matchNo; ?>" type="text" id="home_score_<? echo $matchNo; ?>" value="<? echo $home_score; ?>" size="2" maxlength="2">

$matchNo = $matchNo + "1";

// end loop

When the user presses submit i then need to write these to another table. So how do i retrieve the list of form fields when they have dynamic names and the number of form fields differs each time?

View Replies !
Auto Fill Dropdown List Error
Im using the code below to autofill a dropdown list from my MYSQL DB.
The only problem is it is leaving out the first entry (alphabetically) for each $vehicle_make ? Does anyone know why this may be hapenning? Code:

View Replies !
Auto Fill Date Dropdown List
How would I modify this code to display the years in the dropdown list like so:

current year
2006
2005
back 50 years

<select name="year" id="year">
<?PHP

for($i=date("Y");
$i<=date("Y")+2;
$i++)
if($year == $i)
echo "<option value='$i' selected>$i</option>";
else
echo "<option value='$i'>$i</option>";
?>
</select>

View Replies !
One DROPDOWN SELECT Control Can It Fill In 2 Textboxes?
I have a form with text boxes and a dropdown menu with names of cities
The adjacent textbox fills by the help of a Javascript function.
My question is, how to realize the purpose of filling the adjacent texbox
for zip values. Code:

View Replies !
Identifying Dynamic Form Fields
User goes to page which is a form that asks for some basic info regarding returning products for credit/exchange, and also asks for how many products are going to be returned. Upon submitting, a return authorization form is presented to them with the specified number of product fields. I now want to take the input from this form and email it to myself, as well as, display a confirmation page to the user. The problem I have is a can't say, for instance, echo "$field_name"; because field_name will get created dynamically after the user specifies how many products to return. For example, say the user says 5 products, this will generate a form with field names like:

return_code0 inv_num0 qty0 product0 cre_exch0 stockout0
return_code1 inv_num1 qty1 product1 cre_exch1 stockout1
return_code2 inv_num2 qty2 product2 cre_exch2 stockout2 and so on....

These get created with a for() loop. Once this form is submitted, how can I address the field names? Code:

View Replies !
Script To Automaticly Fill In Fields On A Website
I have a website that me and my friends need to vote on every day.  It has one field, the email field, and one field a image verification that you have to type in.  What I would like to do is have a script that looks opens the webpage in a new window, populates the email address from a database, then repeats for each name in the database.

That is really all it has to do, I can go and do the image verification myself, it would be nice to have something that can do that too.

View Replies !
Best Way To Change Values Of Fields Depending On Page Function.
I have at the moment a create_user.php and edit_user.php

they are the same, create has <input type="text" value="" name="xx"> for a field, and edit has <input type="text" value="<?=$row['rowhere']?>" name="xx"> - I would much rather have just the one page where if page function was edit then it calls in the row otherwise leaves value blank. How can I do this other than

if ($pagefunction == "create") {
echo "<input type="text" value="" name="xx">";
}
elseif ($pagefunction == "edit") {
<input type="text" value="<?=$row['rowhere']?>" name="xx">
}

on every field!?

View Replies !
Dynamic Image Depending On Page
I have a At the top of each page I am including navigation.php, which includes the logo in the top left corner. For one page, I'd like to use a different logo but I still want to just include the navigation.php page. Is there any way I can say "if you're on this page, use this logo image"?

View Replies !
Mysql Ajax Dynamic List To Fill More Than 1 Textbox With A Dif.value For Each?
Ok, I have a database: ie...

Id | cab | price | w1

1 | wall | $300 | $19

on my form I have three textboxes: input1 is cab with autocomplete, input2 is price, & input3 is w1

The way I have it now works great, I type a few letters in input1, it pulls up a list, once cab is selected it populates input1 with cab and input2 with price.

I want to know once cab is selected, if it can populate input2 with price & input3 with w1 as well? Code:

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 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 !
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 !
Selecting Initial Value On A Dynamic Dropdown Box
I have a drop down box and am trying to figure out how to select the initial value from the results of a query on my page. Code:

View Replies !
How To Create A Dynamic Dropdown List
how to create a Dynamic drop down list using Mysql.

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 !
Dynamic Dropdown List Using Access
I am creating a dropdown list that is populated from an Access DB: Code:

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 !
Assign Dynamic Dropdown To Variable?
Is it possible to assign a dynamic dropdown script to a $variable? Code:

View Replies !
Form - Clients Fill Out An Estimate Form
I have a form on our website that clients fill out an estimate form and it is emailed back to us. The contact information of the customer (ie. name, address, city) will send but the rest (ie. Type of est, How they heard about us, etc.) will not. Code:

View Replies !
Fdf Fill Out A Form
I followed the instruction of http://fooassociates.com/phpfer/html/rn20.html

I know how to fill in the data into a form on the browser of the client.
Is it possible to fill out the form on the server and to send this as a
pdf file to the client?

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 !
Automatically Fill In A Web Form
As part of a group project I have been assigned to research how PHP can be
used with HTML web forms. What I need to know is, is it possible to
automatically fill in a web form using a PHP script? i.e. Fill in the text
boxes, and such with information passed in to the PHP script.

View Replies !
Auto Fill Form
I need to fill a form that is on another website that I don't have any control over. Basically there are two fields on that other website. First name and lastname. Is there anyway I can auto fill that from my site? I know We can submit forms on another site using CURL. But I would like to know if i can fill the form fields on another site.

View Replies !
Fill In A Form + Get Results
Is it possible to use php to fill in data on another site, and get the results back from the site? i presume if so, i will need to parse html? the remote site I want to use is a .do ( java ) site.

View Replies !
Auto Fill A Form
I seen a website doing this but not in php so Im wondering if it is possible to open up
a page like http://mail.yahoo.com and fill in my username and password with a php script?
if possible how can i do this?

View Replies !
Form Fill & Print
im trying to create a simple form that visitors will complete name address phone email and quantity, i dont need the form sent anywhere just a confirmation page that the visitor will print and post. its just to place an order for one item i will sell. I see so many PHP forms but they seem way to advanced for my simple needs.

View Replies !
Fill Fields When User Selects User From DB
I have a field with a selectbox which contains a list of client names and several other fields which display information from the DB.

I need to be able to make the fields change to the appropriate information when a user is selected from the select box. Can anybody please give me an example of a bit of code that will do this?

View Replies !
Autmatic Form Field Fill
I have two fields in a form. The first is the email field the second is the username.
Now I want the username field to be filled automatically with the part before "@" of the first field.
So if someone fills in "brain@domain.com" the second field has to be filled with "brain".

View Replies !
Create And Fill-in Form From MySQL
I am working on an admin page where a user can input data into two text fields. When the the form is actioned the two fields are inserted into a table as a row.

What I want to do is when the user calls up the form, any rows that exsist in the table are inserted into the text fields. So the user will see x number of rows with the text fields on the form (x number being number of rows in table). The data is listed in order as determined by the MySQL query. At the end I want to add two blank text fields.

The user can then edit the data in the text fields which updates the appropiate row or enters data into the bottom (blank) text fields which adds a new row.

This is the query I have to call the data PHP Code:

View Replies !
Fill A Form Authenticated HTTPS
I'm searching all around the web without any good answer, maybe you have
the right one.

I'm trying to fill&send a form on a site authenticated https via curl.
The problem is simply that it doesn't arrives to authenticate..
It returns id error1 -> unsupported protocol.

The code is the following:

<?php
$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

$login_url = "https://www.my_site.com/login";
$login_data = "username=my_user_name&password=my_pass";
$form_url = "https://www.my_site.com/form";
$form_data ="input1=walla&input2=test";

$ch = curl_init($login_url);

curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_COOKIEJAR, "curl_cookies");
curl_setopt($ch, CURLOPT_COOKIEFILE, "curl_cookies");
curl_setopt($ch, CURLOPT_POSTFIELDS, $login_data);

$body = curl_exec($ch); // login

curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_URL, $form_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $form_data);

$body = curl_exec($ch); // get form results

echo "error curl_errno ($ch) <br>"; //it return error id1
curl_close($ch);
?>

View Replies !
Passing Variables To Fill A Form
how can I send variables from a php page to a form - i need to fill the form with these variables? maybe using (the process of passing variables to other pages - through url) but how can i assign them to form variables ?

View Replies !
Automatically Fill And Validate Form
I have a simple HTML login page with a username and a password field, as well as a submit button, which I have to use for login(I cannot simply replace it by a php-page.

is it possible to call this page via a hyperlink from a php-script and to directly fill the username and password fields as well to raise the event of clicking the submit button.
Goal is that I when click the hyperlink on the php-script, the HTML-login form is automatically filled and the login is done automatically without having to click on the submit-button.

Is this possible?

View Replies !
Auto Fill And Submit Form
Can i fill a form and submit it automatically using PHP? or Suppose a PHP script uses the 'Get' to get variables, I suppose i can directly specify a value to that variable as

url/abc.php?fieldname=value

What if it uses 'Post' ?

View Replies !
Auto Fill Form Inputs
I have the drop down menu that list the person's name from the MySQL query. Next to the drop down menu I have 3 text boxes...user's name, user's sex, user's age. I want 3 text boxes to display the information that is already in the Database when I choose the user I want to see. I have the DB table that houses users information already with the information already entered. Once I click user 2 I want that user 2's name, sex, & age to be displayed in those 3 text boxes that I already have. Then if I choose user 10 I want user 10's information to populate in those 3 text boxes.

View Replies !
Edit Form, Data Not Re-fill
im doing a edit profile page. the page would pull out data frm mysql and populate the forms respectively.

user will edit and update their profile. The page would then validate the value in the form. if there's an error, it would prompt the user. when this happen, the form do not retain the newly entered value but instead re-display what is pull out from the database.. how do i retain the newly entered value in the textbox? Code:

View Replies !
Auto Fill 2nd Form Field From 1st Info
I want to be able to auto fill the description of an item based on the part number. I know I can do this but have to reload the page each time. Not a problem except I am not sure how to do this without submitting the form, however when I submit the form I want to go to a confirm page. Code:

View Replies !
Form Submit To Another Source Depending On A Certain Variable
I am trying to have a form submit to another source depending on a certain variable. Only problem is that the variable is not defined untill after you submit the form. Basically if a certain text field in the form is left blank i want it to be posting to a different place.

View Replies !
Having A Form Submit To A Different Place Depending On A Variable..
I am trying to have a form submit to another source depending on a certain variable. Only problem is that the variable is not defined untill after you submit the form. Basically if a certain text field in the form is left blank i want it to be posting to a different place.

View Replies !
Replacing A Form Depending If Link Clicks
iam having trouble with this script iam trying to make what iam trying to do it have a 2 forms in 1 document but only display 1 at a time depending on the condition

ive got a form which is used to add to a mysql table and 1 to update i want the add 1 to be visable all the time until the user clicks edit then it gets replaced by a update form

this is the code for the update query would i need to out it in some sort of if statment like if $_Get['editreult'] is clicked echo Update form else echo Add form? Code:

View Replies !
If 10 Clients Fill Out A Form On My Page Simultaneaously And Hit Submit
If 10 clients fill out a form on my page simultaneaously and hit submit, how
does my (Apache2.0.50/PHP4.3.8) server exactly ensure each gets 'their own'
completed form returned ? Or is it possible the clients get mixed up under
some conditions?

View Replies !
Prewritten PHP/Mysql Scripts That Allow The User To Fill Out A Form
I have receive hundreds of emails per day with information that then needs to be put live on my website, things like Bands Name, CD Name, Year, Etc, Etc for unsigned bands. Now as you can probably tell this is becoming somewhat of a tedious task.

Are there any prewritten PHP/Mysql scripts that allow the user to fill out a form that is then submitted to the site itself, after I have checked to make sure that all the information submitted is fine?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved