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.





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 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 !
Form Processor To Redirect To A Specific Page Based On The Selection Of A Radio Button On The Form.
I need to have a form processor to redirect to a specific page based on the selection of a radio button on the form.

It would be like this:

If selection is button "A" then goto A URL
If selection is button "B" then goto B URL
If selection is button "C" then goto C URL

I don't know how to code in php or when I would put such a statement.

View Replies !
Dynamic Page Title Based On URL Variables?
I am setting the title for a drupal site of mine with the following script:

<?php
drupal_set_title($_GET['Foo1'].' '.$_GET['Foo2'].' '.$_GET['Foo3']);
?>

that's working just fine... but I want to include some additional text in the title like this:

"search.php?Foo1=Bar1&Foo2=Bar2&Foo3=Bar3" ... title would be "Bar1 Bar2 Bar3 TEXT"

How can I insert additional text into this output? Can I put an echo in here somehow?

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 !
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 !
Read Dir And Sub-dir And Return It To Combo Box (selection Box, Dropdown Box)
Here I have a code that read trough a directory and return every image to a selection box.

I would need that code to read trough a directory and return all images with in that folder and is sub-folder, all his sub-folder. Code:

View Replies !
Forms Based On Selection
I have two form select elements which are being populated from a microsoft sql database.
I need the second select element's contents to be based on the selection in the first select element. For example like say the first select element has a list of countries and then when you select a country, the second select element is populated with the cities in that country.

View Replies !
Add To Date Based On User Selection
I have a form with Radio buttons that when selected should add "$howMuch" amount of hours to the current date and time and put the output into a field called "ExpireTime". The code I'm using for the hour adding: PHP Code:

View Replies !
Load Form Based On A Selection
I'm trying to display a drop down list and let the user choose from it, then based on his choice another form will be displayed under the drop down list. I have more than 20 different forms, each one is saved on a php file, I need to save the selection from the drop down and the input from the form in the database. is there any way I can do this?

View Replies !
Switching Array's Based On Selection
I've got an array that contains the column names of a table (all hand written in, it's not populated by a query) and then a nice display name...I have a drop down box that displays the array, my question is how can I tell my query to search based on the array key of the array, not the value (which is what is displayed in the drop box. The code below will explain.

<option name="search_drop_box">
<?php 
$search_type = array ("case_number" => "Case Number", "uniqueID" => "Our ID", "defendant" => "Defendant", "addressone" => "Address One");

ksort($search_type);
foreach( $search_type as $col_name => $display_name)
{
   echo ' <select>$display_name</select>';
}

$search_value = $_POST['search_value'];

mysql_query = "SELECT * FROM case_information WHERE $_POST['search_drop_box'] = '$search_value'";
?>

View Replies !
Display Pages Based On Selection
It's basically a form (or a bunch of forms on sequential pages), and if one selection is chosen, then they see certain form fields in the next page, and if another selection is chosen, they see different form fields on a differnet page.

Basically index.php is always the active page, and depending on what page they are on (determined by variables I'm passing from page to page), the page*.php file is included (using require_once) to display that page. (page1.php, page2.php etc..) Code:

View Replies !
Array Created Based On The Selection Of The Box.
I have a list of e-mail addresses in a selection box (dynamically creatd from a table). Currently the user chooses an e-mail address and sends an e-mail to the appropriate person. How can I make it where they select multiple addresses and send them, I tried just adding the word multiple and of course that didn't work. Do I need to have an array created based on the selection of the box.

View Replies !
Dynamically Populating Listboxes Based On Previous Selection
How do I populate the second listbox in this form based on the selection of the first listbox?

The first listbox is populated by this query:
$year_query = "SELECT distinct year FROM bench_data";
The second listbox should essentially be populated by this:
$industry_query = "SELECT distinct comp_desc FROM comp_desc, benc_data where $_POST['year']=bench_data.year and bench_data.comp_key=comp_desc.comp_key";

I know this is alot to ask, but please EXPLAIN the code.  I am new and need the explanation elucidated and not just supplied code that will accomplish the goal. Code:

View Replies !
Regex Issue ... Context Selection Based On Word
I'm building a site search feature for our website, and I'm having a hard time. The results come from a MySQL fulltext search, which works fine. But I want PHP to select an excerpt from the body of the article so that the user knows in what context the search was made. Code:

View Replies !
Populate A Form Based On A Choice Made By Selection Box?
Is there a way to populate a form based on a choice made by selection box? I don't want the page to be reloaded, and I'm not sure how to do it with javascript.

View Replies !
Dynamic Selection
I know this is not purely related to php script but if there is someone guru who already solved this kind of problem. How do I have the list of OPTIONs in a SELECT listbox change depending on the selection in another listbox?

example for this is:

you have one listbox which selects the country then you have a second which should only display the valid states/province for that country, or one listbox which shows categories and another which lists the subcategories for that category, etc.

View Replies !
Dynamic Variable Selection...
Is it possible to create a bunch of variables in a loop with different #'s at the end of their name... like:

while ($counter <= 10)
{
$myvar$counter;
}

to create 10 variables.... mayvar1, mayvar2, mayvar3, etc.....
is there a way to do that?

View Replies !
Dynamic Menu Selection
Code:

<?php
include ("UpLoad/connect.php");
$load_sql = "SELECT Facility,FacilityID FROM tblLocation";
if (isset($_POST['cust']))
{
$load_sql .= " WHERE FacilityID='".$_POST['cust']."'";
}
$main_query = mssql_query($load_sql);
$users = array();
while(($fetch = mssql_fetch_array($main_query)) !== FALSE)
{
$users[] = $fetch['FacilityID']

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 !
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 !
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 Anchor Based On Last Name
I have a MySQL database that hold the list of employees. I display the page using PHP. All of this works great, I sort by last name ascending so the list is A-Z.

Here is what I want to do.

At the top of the page I want to list each letter of the alphabet and have it as a link. From that link (lets say "G") when I click on G it jumps to the first employee that has a last name that starts with G (staying on the same page)

Is there some way to create a dynamic anchor that would jump to a specific areas based on how the alphabet link was coded?

View Replies !
Creating An Article Based Website
i need to create an article based website, what words should i search for in yahoo to find a good strategy? or can someone just give me hints how to create it?

the site should do the following->
1-only administrator can add articles
2-public can only search
3-and of course the search should be optimized and fast.

View Replies !
Creating The Timer For A Turn-based Game
I've been working on creating an online turn-based game where a new turn occurs every hour, and the amount of items such as resources (gold, iron, food, whatever) is changed when the turn changes, regardless of whether a user is online or not.  I've played many games like this before (I guess falling under the PBBG genre), so I know this is possible, but I can't figure out how to do it, and I'm obviously searching for the wrong phrases in forums because I can't find a tutorial anywhere.

View Replies !
Creating Rules Based Data In Form
On my form that I created that the data is being sent into a database, I also want to create rules to send outgoing email 1 of 5 people depending on something that was entered in the form.

View Replies !
Creating Totals Based On Field Input
I am trying to create a report with PHP that pulls data from a mysql database. Lets say in table called survey I have a field called zipcode, in which users fill out a form and enter their zip code. In the database the following entries have been made in the zipcode field: Code:

View Replies !
Dynamically Creating URLS Based On User Input !
I am looking to create pages on the fly or dynamically based on user input. For example if i have www.example.com and they visit this and enter 'bob' in a textfield and press submit they create www.example.com/bob.html . How would I go about this ? I am guessing I need to create a folder when submit is pressed in my website directory ?

View Replies !
Creating Table Rows Based On Query Result
I am trying to create a simple table with a fixed number of columns (5) but the number of row will depend on the results of the query. I have tried various examples found here or there and I can't get them to work. Code:

View Replies !
Dynamically Creating Html Table Based On Array
I need to create a table based on parameters from a form on the previous page. The form sends up to 15 variables that are read out of the url into an array ($func).

These variables refer to functions that a product may or may not have. This page should show which products have the functions chosen.

Normally when I create such a table in DW, its always based off the DB directly with SQL, with a filter on the URL parameter. I can't work out how to do the same when there are multiple parameters in the URL, or alternatively, pulling the parameters from the array.

View Replies !
Looking For Very Simple And Dynamic Photo Gallery Based On Directories...
I'm having trouble finding something. If I can't find it, I could
bumble my way through writing something, but I thought I'd check around
first.

I am looking for a php script or some other software that will build a
dynamic photo gallery without adding or changing my photos, or creating
any static content.

I use Gallery2 for my favorite photos...but I'd like the rest of the
thousands to be available online, and to be available just becuase
they're in the photos folder. I keep my photos in something like
/home/mdg/Photos/2006/whatever ../2006/whateverelse
.../2006/whateverthethird and I add them all the time.

I want a script that I could keep at
/home/mdg/public_html/somescript.php or whatever...and point it at my
photo root and have them all be there when I hit the script with my
browser.

View Replies !
Dynamic Photo Gallery Based On Mysql Database
I would like to turn my attention to using PHP to organize hundreds of images on my site. I would appreciate some direction. I have in mind putting the image names in a database and will use those names to create links, likely output as a table or drop down menus in a form.

I specifically wonder if there is any way to "dynamically" create thumbnails in PHP from the full image? Alternately, are there any programs out there for "batch creation" of thumbnails?

View Replies !
$PHP_SELF - Create A Link Which Refreshes The Current Page, And Based On Certain Items On The Page
On a page, I want to create a link which refreshes the current page, and based on certain items on the page (simple form objects like radio buttons)the page will load differently. My link looks like this: PHP Code:

View Replies !
Refresh Only One Dropdown Box On A Page
I have a form with many fields and a drop down box called fruit. Lets say it has three choices:

apple
orange
banana.

If the choice is not on the drop down box e.g. grapes the user clicks a link to a new table called add_fruit to add the new fruit and details about the fruit. On submit I want to close the add_fruit table and go back to my original form - refresh only the dropdown box "fruit" - so now the user can pick grapes.

View Replies !
Creating Dynamic Graph?
I know nuts on this area but I know PHP have a module that can create a dynamic graph based on the data fetched by the database.

Can anyone guide me with this technology? I don't even know where to start -- but I heard that it start with some 'GD' letters.

Any suggestion & help would be much appreciated.


Thanks.

View Replies !
Creating A Dynamic Include
I am trying create an include ( ) string built from user defined variables. PHP Code:

View Replies !
Creating Dynamic ANCHORS !
I'm developing a system where i'm uploading Profiles of different
famous persons. Now i need to create ANCOHORS inside the page so that
i can jump to different sections form the top of the page, all my data
are coming from the database. My main page is a dynamic page, which
comes depending on the Profile Id (GjProfId). and inside that page I'm
trying to call these Anchors. All these are the different parts of
that profile. lets say- Birth, Childhood, Education, Working Life,
Achievements, Death these are some section to display. I want to
display all these as links at the top of the page and make anchors to
the sections where they are in the page. I hope i could make myself clear!

The top links are created nicely but when i click them it does not
navigate to the section in that page. Say, i want to go to "education
" who's ID is 108, in the address bar I get some location like ::
http://localhost/gj_new/pagelink.php?GjProfId=5#108 (This page is
Dynamically generated ofcourse)

I tried one idea -- I had put the link in the different Titles of
sections and then put a NAME Anchor by that Title name near the main
Section. but it is not working. (This matter works in Static pages.)
here is a sample of my code....

$sql="SELECT * FROM gjprof WHERE GjProfId='$GjProfId' ORDER BY GProfId
ASC";
$resultlnk=mysql_query($sql);
while($rowlnk=mysql_fetch_array($resultlnk))
{
$GProfIdlnk=$rowlnk['GProfId'];
$GjProfHeadinglnk=$rowlnk['GjProfHeading'];

<a href="#<? echo $GProfIdlnk ; ?>"><? echo $GjProfHeadinglnk; ?></a>

Some other stuffs ........... .. .. . . . .. ...... ... ..........and
then the anchor beside the Main Heading of the Section .......

<a name="<? echo $GProfIdlnk;?>"></a><? echo $GjProfHeading; ?>

Will someone please help me with it!

View Replies !
Creating Dynamic URLs
I feel dumb having to ask this question in the first place, but I just
can not figure it out. I am wanting to set my site up using dynamic
urls (I'm assuming that's what they're called, an example of what I
have in mind is index.php?page=[pagename]). However, I can not figure
out how to do this. I will eventually want to use SEF urls, but for now
I'll be content just to have the dynamic urls. If anyone can tell me
how to do this,

View Replies !
Creating Dynamic Variables
I'm trying to pass 100 variables (named gain1, gain2...gain100) from a swf to a php file then write these variables to a text file.  Sending the data works fine. 

I just need help creating the variables in the php file.  Since all the files have partly the same name, I was hoping to create the variables dynamically.  I was hoping to do something like this:

$myFileName = "myfile.txt";
$myFileHandle = fopen($myFileName, 'a') or die("can't open file");

for (i=1; i<100; i++) {
$gaintext + i= $_POST['gaintxt1' + i];
fwrite($myFileHandle, $gain + i);}

However, this isn't working obviously. 

View Replies !
Creating Dynamic Forms
I am trying to create a form will populate and display in real time.
For example:

Ln 1. Name: [ ] Sex: [/] Favourite Sport:

View Replies !
Creating A Dynamic Link
i want to do is to make each name a link that when someone clicks on it redirects to another page where all the entries stored in the jobs database are listed. So i need to make a query that takes the employer listing that u clicked and does a SELECT * FROM JOB WHERE employerName = employername. how i can do this?

View Replies !

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