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.





Populating The Drop Down And Pressing The Submit Button


1. The first is I have two drop down menus. The first is "year" and the second is "mfr". When a user selects a year from the drop down it then populates the second drop down, mfr, from the MySQL database. Theat is working fine. But the problem I am having is the "submit" button (which I have labeled as "browse"). When I click it. Nothing happens, no action tacks place. I have looked over the code and I can't figure it out. (See Code Box 1 Below).

2. Right now the "mfr" drop down is populated by the MySQL database and reads with a list like "Acr", "Alp", etc. These are abreviations. I need to set up an array to have them instead read the entire mfr name. Example: Instead of "Acr" it needs to be "Acura". Instead of "Alp" it needs to be "Alpine". I need these full names to appear in the drop down. I know I need to do something like this (See Code Box 2 Below) but I can't get my finger on it. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Is It Possible To Execute A MSSQL Query By Pressing A 'Submit' Button?
Currently I have a page which allows me to add users to an event. I have a drop down menu with the users, and my goal is to be able to add users to a table, so when I want to display the event, I can also see the users who are to attend.

As it stands now, I have it coded, albeit incorrectly. I can submit users, I can display them with the event correctly, but I am having a couple issues.

1) Anytime I hit F5, a blank record is added to the table.

2) I cannot for the life of me figure out how to delete a user from the list! I understand it in theory, bgut I cannot figure out how to tie a sqlquery DELETE to an HTML link which when pressed will execute the query.

So, is it possible to tie a sql INSERT query into an HTML 'Submit' button? Is it possible to tie a sql DELETE query to an HTML link?

View Replies !
Pressing The Submit Button Will Returned To The Index.php Page.
I am trying to build a cms , i am a beginner in php. I have a little chatbox ( i use include() in the index.php file ) and I need something llike this : after someone is pressing the submit button it will be returned to the index.php page.

View Replies !
Pressing "SUBMIT" VS Pressing ENTER
I have a little weired problem .

A PHP function attached to a form produces wrong resutls when i perss ENTER insread of pressing the SUBMIT button by mouse ? How can that be solved ?

View Replies !
Automatic Submit Without Pressing GO
When you click a drop down box to display, then select the option from the drop down box after that, how do you make it submit automatically without pressing "go" or "submit" button? Can I do that in PHP?

View Replies !
Submit Form By Pressing Any Key.
I would like to create a hidden form which shold be submitted after
user press any key. Is it possible?

View Replies !
Pressing Submit Refreshes
Last night i coded a silly little login script for practice. I'm not the world's best programmer, and I've not used php in over a year, I've been using pascal and C++. Can anyone see why, when I push submit, the script just refreshes rather than submitting the data to MySQL? PHP Code:

<html>
<head><title>Register</title></head>
<body>
<?php
$self = $_SERVER['PHP_SELF'];;
$username = $_POST['username'];
$password = $_POST['password'];

if( ( $username == NULL ) or ( $password == NULL ) ) {
        $form ="Please enter all new user details...";
        $form.="<form action="$self"";
        $form.="method="post">Username: ";
        $form.="<input type="text" name="username"";
        $form.=" value="$username"><br>Password: ";
......................

View Replies !
Pressing "SUBMIT
I have a search form that includes a number of drop-down menues and a text field. The search works correctly only when i press the SUBMIT  button by mouse. When i press ENTER after filling the text field, it doesn't send correct values. The search returns all results without the condtion as if it empties the text field before sending.

View Replies !
Pressing Submit Refreshes My Login
I've made a log in script but when I press submit...The script just appears to refresh. Code:

View Replies !
FORM MEMORY ON PRESSING BACK BUTTON
Do most browsers retain form fillup memory of previous page ? That is
when the user presses back button, the forms on the previous page come
up filled.

View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this:

<?php
session_start();
session_unregister($SESSION);
session_destroy();
unset($SESSION);?>

In each page I have this other script
#accesscontrol.php
<?
session_start();
if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo
{ #Maybe I use after. } else
{echo "<h1>Sorry...</h1>";
echo "<A href = "index.php"><H4> Login Univernet</H4> </A>";
session_destroy();
exit;}?>

The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.

View Replies !
Pressing Browser Back Button - Form Filled Data Disappeared
When filling out a web form on a php page that is submitted to a search
which lists the results based on the criteria provided (in the form), all
works fine and as expected.

However, when I press the back button to amend the form all of the search
criteria data has gone and I have to fill it all out again if I want to do a
similar search which is frustrating. (This does not actually happen in
Firefox browser but most of my users will be using IE). How can I prevent
this from happening?

Previously I made a post about avoiding "Page has expired" and the
conclusion I came to for that was not to use a "POST" which did the trick.
But now I want to retain the data I input?

View Replies !
Upload File Having Browse Button And Submit Button On Same Form
I am building a form where the user must upload a picture and fill in his
details.
Now I have a problem as all of this is on the same form.

How will I be able to have the Browse button to open the "file browse"
dialog
and the Submit button to submit the form data.

As I believe you can not use GET but must use POST method for form.
Is there any means that I can use GET cause I need to get form variables
from URL as well.

View Replies !
Populating Drop Down
How do I do this drop down box ? Making an edit page. I have 2 tables

groups
id || categoryname

program

id || cateogry_id

I need to populate the groups in it at same time show the selected choice from program. Not showing id but needs to show categoryname with of course the values being the id of groups.

View Replies !
Passing Radio Button Values To A Submit Button (gif)
How do i pass the value of the radio button to be put of the action
that includes the value as part of the URL being submitted - "/
picked.php?pick_num=". Any help with be appreciated. Thanks

<form method="post" action="/picked.php?pick_num=".<php? $value ?
<input type="hidden" name="cmd" value="0">

<table width="100%">
<td align="center">
<INPUT TYPE='RADIO' NAME='pick_1' VALUE=&#391;'>Day;
<INPUT TYPE='RADIO' NAME='pick_2' VALUE=&#392;'>Week;
</td>
</tr>
<tr>
<td align="center"><input type="img src="/images/pick_now.gif"
BORDER="0" name="send"></td>
</tr>
</table>

View Replies !
PHP + MYSQL, Populating Drop Down Box
I am looking to generate a dropdown box from MYSQL data:

db name = h2, table = Working, Column = Home.

View Replies !
Populating A Drop Down Menu
How would I go about populating a Drop Down menu from data in MySQL? If you can show me wither a URL to learn this, or if you feel like telling me here, that would be great.

View Replies !
Populating Drop Down And Table
I have a database with the following fields.
Name | Company | Date

values in each column could be repeated, or not. as in there could be several same names with the same company with different dates, or different names with same company.

How do I populate a table with this info and have drop down boxes, so that I can narrow down the search? For example:
Name | Company | Date
12     | 1           | 1929
13     | 1           | 1929
14     | 1           | 1929
12     | 2           | 1929
12     | 4           | 1929
13     | 1           | 1941
12     | 6           | 1929

So if in the drop down I select '12' under name, only those entries with 12 are shown, and then I can further sort it by selecting only '1' under Company.
Hope I'm clear, I manage to complicate things when I post them.

View Replies !
Auto Populating A Drop Down Box
Basically I'm setting up a website which needs an populated drop down box made up from all fields in a specific column of a table in a mysql db....

Here's the code I've made up using various tutorials....

<?php 
$user = "";  
$host = "" 
$password = "" 
$dbName =  "" 

/* make connection to database */  
mysql_connect($host, $user, $password) OR DIE( "Unable to connect 
to database"); 
mysql_select_db($dbName); //did you forget this line? 

$sql = "SELECT model FROM usedVehicles"; 
$query = mysql_query($sql) or die(mysql_error() . "<br>$sql"); //use the or die(...) part ONLY IN DEVELOPMENT 
?>

<form action="action" method="post"> 
<select name="option"> 

<?php  
while ($row = mysql_fetch_array($result)) {  
    echo "<option value="" . $row['model'] . "">" . $row['model'] . "</option>
";  
}  
?> 
</select> 
<input type="submit"> 
</form>

I've left out the connection details for obvious reasons... When I upload and try to test this, jus a blank drop down appears... there are definately fields in the column as I have tried the query on phpMyAdmin.

View Replies !
Populating A Drop Down List With Php
I am trying to get a drop down list to populate vbia php. What I have a is a script that allows a airline/user to enter airfare and price for tickets. It dumps them into a database and then allows the user to view/delete/add.

I want the user to be able to edit the airfare. I have a drop down list that is set as a variable $ticket_from, $ticket_to. The list contains around 400 cities. When the user clicks 'edit' I have the price population but no the drop down list. How do you go about something like that? I have this right now: Code:

View Replies !
Populating Drop Down Lists
Could anyone help me on populating database driven drop down menus. I am trying to populate a second drop down list based on the selection of the first drop down list. I have the first drop down list running. Not sure about getting the second now.

View Replies !
Populating Drop Down From A Query
I'm trying to populate a drop-down box from the results of a query. I end up with the first option coming through and then blanks in the rest. Something like this...

<option value=Acevedo>Acevedo</option>
<option value=></option>
<option value=></option>
<option value=></option>
<option value=></option> .......

View Replies !
Self Populating Drop Down Menus
i am trying to do is the following: I have a MySQL database that (very simplified) has a schema like this 'Students(Name, id, Course)' I would like to have a form on a web site that has 2 linked drop down menus, one 'Please select id' and one 'Please select course'. When a user of the site selects there Id from the first drop down menu, i want the second drop down menu to populate itself with the courses held in the database for the given users Id. I would like the first drop down menu to be populated from the database with a query similar to 'SELECT id FROM students'.

View Replies !
Populating Drop Down From MySQL
I am trying to populate a drop down menu of MySQL data using PHP and I have hit a snag. I think its probably something simple that a freah pair of eyes could pick out right away that I am just not seeing...

For some reason only the "firstname" part of the data is populating in the drop down and I can't figure out why. When I try to make changes to the echo lines to correct this, nothing shows up including the "firstname" data. Code:

View Replies !
Populating Drop Down Menu
I use the following code snippet to build a drop down menu with the
results of a query. How can I set the initial value of this input based
on the result of another query?

What I am trying to do is update records in the data base. The field
WkEndDate is pulled along with the rest of the record and the drop down
menu is built from a table of valid WkEndDate values. Code:

View Replies !
Populating Drop Down Fields
I am trying to populate a drop down menu with a mysql database. I was hoping to have a selection of months in the dropdown menu, based on date fields in my database when a user then selects a month, they will be brought to a new page that will have only the records created in that month. But in my database, the date is stored in this format: 2006-05-12 00:00:00 if you need to see my code, here it is:

<?
//database connection
$query = mysql_query("SELECT * FROM casinocredit");
// start to print out the form
echo "<form action="cats.php" method="POST"><select name="clients"><option value="" "selected">Select A Client</option>";
// loop through the records
while ($row = mysql_fetch_array($query))
{
echo "<option value="{$row['ID']}">{$row['ddate']}</option>";
}.........

View Replies !
Populating A Drop Down List With The Year
i'm trying to loop the years from 1960 - 2010 with the function get_year() below:
PHP Code:

View Replies !
Populating A Drop Box With Results From Database
I have a MySQL database with a table (category) with two fields, catId (int) and category (char(50)). What I want to do is to get all category names in this database and place all of them into a dropdown box on a web page so that the user can choose from the list of available categories.

View Replies !
Populating A Drop Down Via A File Directory?
I just wrote this code:

$dir = "/images/news";
print "<select name='file'>";
$dir = opendir($dir);
while (false !== ($file = readdir($dir))){
if (in_array($file, array(".", ".."))) continue;
print "<option value='$file'>$file</option>";
}
print "</select>";

But for some reason it is not populating. It instead echoes an empty drop down menu. Can anyone suggest anything?

View Replies !
Populating Drop Down Boxes From Database
I have two drop down boxes, the first one i am able to fill from my database using the following code. Code:

View Replies !
Populating A Drop Down From A MySQL Table
When they click submit, I want the name dropped from "invite" and added to a table "guests" with their answer if they are coming and how many. I know the SQL to make it happen, but I am pretty sketchy about the PHP. Code:

View Replies !
Session Problem - Login Screen Continually Reloads After Pressing The Login Button
I am trying to get sessions to work on a log in screen to give certain
users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4

I have pasted the code below:

View Replies !
Submit Form Without Clicking Submit Button
I was wondering if it is possible to use something like Javascript to make it so you don't have to click the submit button on a form to make it submit, while using php and mysql. e.g. Code:

View Replies !
Auto Populating Multiple Drop Downs.
im trying to create two dropdowns, i need the first one to be the category and the second one to be the subcategory.  The category drop down autopopulates with the correct info from the database. and uses the table "category", the value of each drop down is represented by the "cat" field in the table (cat is basically and integer id number) and "Category" is used as what the user actually sees in the drop down (category is the actual word of the category).

Once the category is selected i would like to have the sub category auto populate with everything that has the same values as the selected category (cat)

Here is a break down of how the tables work.

Table 1 Name: "category"
Fields for Table 1:  "cat" (the id number), "category" ( the actual name of the category)

Table 2 Name: "subcategory"
Fields for Table 2: "cat" (corresponds with the cat id from table 1 to pull the correct data), "subc" (the basic id of the subcategory), "subcat" the actual name of the subcategory.

so the way i see it, have a normal drop down populated by a php query. then on change, populate subcategory drop down where cat = cat and display sub category.

View Replies !
Populating Drop Down List With Selected Vaue
I have a drop down box and the "selected" value needs to be selected by a dynamic value that gets entered into the database, this is currently how im doing it: PHP Code:

<?php
                if($modify_row[21] == "0") {
                  print "<option value=" "></option>";
                  print "<option value="1">Active</option>";
                  print "<option value="0" selected>In-Active</option>";
                } elseif ($modify_row[21] == "1") {
                  print "<option value=" "></option>";
                  print "<option value="1" selected>Active</option>";

Its fairly straight forward, basically the option that is automatically selected needs to be the one coming from the database $modify_row[21].

View Replies !
Populating City,state,country Drop Down Menu
In the registration form I have city, state, country fields. I was
wondering if there was a database available on the net which has the
list of states in each of the countries. That way when a user selects
a country I could automatically populate the state drop down menu ...

View Replies !
Drop Down Menu Select And Populating Data Fields
I have a PHP/MySQL Content Management System set up for the job I work at. It's basically a shift program that lets users pick up shifts, post shifts, etc.

The data fields are tied to the shift ID which is selected from a dynamically populated drop down box. However, I cannot get the data fields to be updated when I select a new value and I cannot get the form to accept the new selected Shift ID. I have tried using JavaScript but cannot quite get it to work. Code:

View Replies !
Populating Multiple Drop Down Boxes From Mysql Table
Am having a problem with a dynamic, multiple drop down box query. If I run the code with only one select, it populates fine. If I run it with 2 selects then only the first drop down box populates - the second drop down box is empty. Am wondering if I need to put the query into an array and populate the boxes from there. Code:

View Replies !
Submit A Form Without The Submit Button
Is there a way to submit a form without the submit button?  Do I have to use the javascript - document.formname.submit();

View Replies !
How To Submit A Form Without A Submit Button
how i can submit a form without using a submit button, i have to use this in one of my ongoing project.

View Replies !
Submit A Form But Without A Submit Button
I want to submit a form but without a submit button. That's to say, I want that by giving a definite code in a field and then press <ENTER> the form will be submitted.
For Example

<form name="search_form" method="post" action="search.php">
.....
....
Code: <input type="text" name="code" onKeyPress="if (event.keyCode ==
13) {document.search_form.submit()};">

....
....

How can I do it without a submit button?

View Replies !
Difference Between A Person Clicking The Submit Button In A Form Or Hitting The Enter Key To Submit The Form?
Is there a difference between a person clicking the submit button in a form or hitting the enter key to submit the form?

I have a form that gives a blank page when someone doesn't fill out the form and presses the enter key, but gives you an error code and redisplays the form if you click the submit button with your mouse.

View Replies !
Submit Button - How To Submit One Form And Then The Form Data Goes To Other Sites
I'm trying to find a way how to submit one form and then the form data goes to other sites. Here is an Example below! I got Sites (Main),(A),(B)&(C) I want to fill in the form on site (main) and it sends to sites (A) (B) and (C).

View Replies !
Submit Button Bug?
I think I've find a very VERY strange bug with form submit buttons (only tested on IE 5.5.). I've got a form in which a password can be changed, which updates a record in MySQl.

If you click the submit button, the page works fine. If you press enter whilst the submit button is highlighted, it works fine. However, if you're inside the text field where you're changing the password and you then press enter, it tries to submit the form but doesn't do anything!

View Replies !
The Submit Button?
I've just been looking a different ways to submit forms, however I find that all is not how it should be... In this incarnation, I have some php script that pulls information from a previous form so I can display it before submitting the data to a database, how ever if I do this: Code:

View Replies !
PHP Vs ASP On Submit Button
All about two submit button. don't know how php manage this but asp does this: PHP Code:

View Replies !
Submit Button
i want to have 3 submit fields,and a submit button,please tell me how to do this.my other question is how to connect this submit button info,to be written in a table in my Database.i have 3 fields in the table in my DB-"number", "comment" and |"date",if this could be of any help.

View Replies !
Get Value Of Submit Button
I have a form with several buttons all named submit with difrent values. form action ="post" I should be able to get the selected button by  $a = $_REQUEST['submit']; but nothing. why?

View Replies !
The Submit Button
I have a submit button that when clicked will open a different page (at the same time passing some hidden values). The field value that will be pass to another page is retrieved from table and the value could be an HTML code. But instead of just storing the value to the field (and just display only the button), it display the HTML output.

View Replies !
Submit Button HELP
I've been here 5 hours now. I have a flash web page.. the variable on every input text field is already set to the same name to which I included in the php server file. it sends email...and it directs me to the page index as I want it to. but why are my fields not being sent to me included in the email.. is there something Im forgetting. in flash 8. I have the button setup SEND USING POST..The text fields set up to 0 characters...and expressin is not checked... I tried adding characters to the text fields... but did not make a difference...also..i have a dummy page setup for now.
here it is.

http://www.mgmediaworks.com/process.html

<?
$to = $_REQUEST['to'] ;
$subject = $_REQUEST['subject'] ;
$body = $_REQUEST['body'] ;
mail( "sandro@mgmediaworks.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.mgmediaworks.com" );
?>

View Replies !
Button Vs Submit
I'm working on a form which input type=submit --> it will work as I want to. (send data to db and go to another page) Here is a problem. I want to use the other button called 'back' to bring data back to previous page. In case the user needs to change the data before submitting. What should i use. I've alredy tried input type=button but it doesn't work. It does nothing.

View Replies !
Submit Button In PHP
<input type="submit" value="Search"/ onclick="this.disabled='disabled'">

But it just greys out the button and does not process the form.  Also, is it possible to create a message under the button that says something like "Hang tight. this might take a minute."

View Replies !
Pic As Submit Button
I have this form. And instead of having a submit button I want a picture link. can this be done?

<form method="POST" action="auth.php">
<input type="password" name="tvlpss" size="20">
<input type="submit" value="Submit" name="B1" style="font-size: 8pt; font-family: Verdana">
</form>

View Replies !

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