Dynamic Drop Down Menu
I'm trying to send emails to different users based on what is selected from a dynamic drop down list. Here is what I have that doesn't work: PHP Code:
<?php
$to = "me@myemail.com";
$subject = "current email test";
$message = "New RMA FORM FOR $rma";
$id = $_POST['status'];
$query = "select id from mytablename where id='$id'";
$result = mysql_query($query);
if (mysql_num_rows($result)==1){
    mail($to, $subject, $message);
}
?>
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Dynamic Drop Down Menu
I'm having difficulties displaying the MakeModelID for a row selected from a drop down menu I've populated from a table combining three attributes (Make, Model and Specification - for example Ford Transit LWB 350 HR). What I require is to capture in a variable, such as $MakeModelID, the ID for that record selected. Code:
View Replies !
View Related
Dynamic Drop Down Menu?
I have a customer table and I wish to be able to dynamically generate a drop down menu, to, for example, select the customer for which operations are to be performed. after I have made the initial select statements, I assume i will then need to use a while loop but this is where I am getting stuck....I am familiar with using while loops for creating tables dynamically but i'm not sure about drop downs. I just wish to show "company name" in the menu. While it be something along the lines of.... while ( $row = mysql_fetch_array ( $sql ) option = $customer_name etc..
View Replies !
View Related
Drop Down Menu?
Im looking for a script for a site im making that will make a drop down menu which I can customise the color of. Simple, like a border and background color, but is friendly with all types of IE explorer.
View Replies !
View Related
Get Value In A Drop Down Menu
I try to build a drop down menu in a record update page the page get the id record to update the page example update.php?id=2 In the drop down menu, are there anyway I can get the value of the record that already insert? Everytime when i update the record, i have to set this level again. Code:
View Replies !
View Related
Drop Down Menu And Php
the problem is i am trying to have the code work so that whoever wishes to add to the options given in the drop down menu can by choose add new option. the page seems fine and doesn't give me any errors but it doesn't seem to be adding the new option in the drop down menu list.
View Replies !
View Related
Using Drop Down Menu
I have big problem. i have post this problem in alot of forums, but nobody help me. i have hear from my friend phpbuilder is the best php forum. so i to i register here. approve/delete comments using Drop Menu, look at the below example : Click here to view the example I want to approve some comments and to delete some comments.
View Replies !
View Related
Php Drop Down Menu Variable
I have been playing with one script for more than two weeks. It is a simple poll script. Once the user has selected from a drop down menu...it is mailed to me. The problem is that I only get the first word of their choice! That defeats the purpose of having the poll!
View Replies !
View Related
Echo Drop Down Menu
What I do is when the form is posted (php_self) it does its check and if there are errors, ie. user has not filled in required data, it takes them back to the form but the text fields are already filled in with what they have already typed. But the drop down menus default back to the PLEASE CHOOSE option, how can I get my drop down menu to be what they have just selected. The reason I need this is there are 6 drop down menus for different things on the page and a user would get fed up having to reselect each one when they have not filled in a field. Code:
View Replies !
View Related
Query Using Drop Down Menu
can i query a table based on a drop down list? i have a list of agents that i just want a simple drop down list to show the records they entered.... right now i just have the entire table showing all records in a html table format...but i want a drop down list so that if they only want to see the ones they entered, they can just select their name and poof...only theirs are shown...
View Replies !
View Related
Drop Down Menu Refreshing
Sites that have mulitple drop down menus where 1 menu decides what the next menu will contacin, after you select the otion you need in menu 1 the next menu refreshs with its new contents and so on and so on..Is this done with Java?
View Replies !
View Related
Updating SQL From Drop Down Menu
i am trying to change a php asset program to include another drop down menu , I have created the drop down and it shows the correct entries from Audit in sql , the process is that the user completes the php form for a new asset then clicks save to enter it to the database , the details below adds another drop down menu once they have selected the correct value i do not know how to capture this and write it back to the sql database . Code:
View Replies !
View Related
Drop Down Menu Values
I have a form below that shows a dropdown menu. The values are email addresses populated by my SQL database, with their associated names placed between the option tags. (Don't ask why I'm using a SQL database - not my decision) My dilemma: I need to insert the $ManagerName into another database, while at the same time emailing them. I DO NOT want to insert the email address into the database. Currently it won't work because only the value is entered into the database, and not what is showing in the selection list. Code:
View Replies !
View Related
Drop Down List Menu.
How do I make one item required on my "drop down" list menu? E.g., let's say that I want one state to be selected, how do I make this possible with PHP? My PHP skill is amature, but I do understand most.
View Replies !
View Related
How To Make A Nav Menu Drop Down In Php
i am interested in learning to make a drop down menu bar - the ones you hover the mouse over and a drop down list of choices (with an almost transparent bg) comes down. then when click it takes you to another page that has another sidebar which highlights the page you are in. so on the side bar you can click and both the img on side bar and the menu bar will change so to indicate what section of the site you are in.
View Replies !
View Related
Re-create A Drop-down Menu
I have 2 drop-down menus (1) States (2) Shows By State. how do I invoke a re-build of the Shows By State drop-down when the user requests a different state. I believe this has to be done with Javascript and I don't know Javascript. Could someone supply a small example of how this is done? I am using PHP and MySQL. Following is the PHP code for building the state drop-down menu: <tr><td bgcolor="#EFC891" width="496" align="left"><b>Select a Show in Your State: <select name="ShowState" > <?php $stateName=getStateName(); $stateCode=getStateCode(); for ($n=1;$n<=50;$n++) { $state=$stateName[$n]; $scode=$stateCode[$n]; echo "<option value='$scode'"; ..............
View Replies !
View Related
Keep Selection Of Drop Down From Menu
Im just working on a enquiry form submission script. When the form is submitted a php scripts checks for empty fields etc. If a empty field is found the for comes back and a error messages is displayed. When the forms re-appears the fields which werent filled out correctly before stay filled in, simply putting setting the fields 'value' with the $_post variables. Now this is ok but is there a way so if the users selects a choice from my drop menu the first time that this choice remains when the form re-appears if something else was found to be invalid ?? Hope I explained that ok?
View Replies !
View Related
Nested Drop Down Menu
I am very familiar with php but I don't know javascript very well at all, and I suspect I may need to know some for this, so I'm looking for some pointers. I need to create a set of nested drop down menus that populate using data from a mysql database. So here's an example.....
View Replies !
View Related
How Do You Create Sub Drop Down Menu?
I have been wanting to create this for my site but i am not sure how. I would appreciate if anyone could show me some example code of how it's done. What want to do is basically, say there are 2 drop down menus on my site, one for country and one for region. Say in the country menu you select UK, i would like all the regions in the UK to show up only, and if you select another country, only the regions in that particular country will show up. I am sure you understand what i mean. I would be very grateful if someone could show us how this is done.
View Replies !
View Related
Assign Value From A Drop Down Menu
I am trying to assign a value to a PHP variable from a drop down menu. The default value is "no." However if "yes" is chosen, I want that to be assigned to $_POST['local_pickup'] Here is what I have so far: <select> <option class = "blue_standard">No</option> <option class = "blue_standard">Yes</option> <?php if ($_POST['local_pickup'] == 'yes') echo $_POST['local_pickup']; ?> </select> Can anyone suggest how to get the yes value assigned to the $_POST['local_pickup'] variable if "yes" is chosen.
View Replies !
View Related
Add Values To A Drop Down Menu
I am trying to use this code to add values to a drop down menu. I can tell the variable is being passed to the correct document(PHP_SELF) however the value will not store into the mysql table. is my syntax incorrect? I've read and copied and pasted several samples of scrips attempting the same task but they are causing parse errors. Code:
View Replies !
View Related
Selected Value In Drop Down Menu
I want the first option ("selected" option) in a drop down menu to be based on the URL a user clicks on. For example, if the user clicks on the link: layouts.php?submit=true&category=abstract The first and selected value in the drop down menu should be abstract Then the rest of the menu will pull from the database. The code I am using now (below) lists all my categories from my database, but it is not putting the selected value first. How can I get this to work?? Code:
View Replies !
View Related
Drop Down Menu Of Pictures
I will be here for a long time to help others. You have to share your knowledge. Anyhoo, I would like to know if this is possible: Drop Down Menu of Pictures. Choose your host: (drop down menu of host faces). Keep in mind I'm totally new to PHP so if my question is really stupid, please don't hurt my feelings.
View Replies !
View Related
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 !
View Related
Drop-down Menu Item
I am looking for a way to submit my form without having the user click the submit button. I would like them to choose one option from a drop-down list, then I would dynamically populate the next drop-down list and so on, as in car buying websites. Choose Make --> then it populates the models ---> Choose Model. I gave this a try in Javascript but was unsucessful. I prefer to do it in php if possible because the user may have Javascript disabled, but if anyway knows of a sure way of doing this in javascript, I'm also open to that as well.
View Replies !
View Related
Verify - Drop Menu
I have a form in HTML and a verification php file to check all required fields. Everything is perfect, except I don't know how to check drop menus (state, and topic). I'm using this code for the other fields: if (!ereg("^[A-Za-z]{1,}$",$firstname)){ echo ("<center>You entered an invalid <font color="#FF0000"><b>FirstName</b></font>.</center> "); echo ("<br /><br />"); $validated = false; }
View Replies !
View Related
Getting The Data From A Drop Down Menu
I have a sequence of drop down menus but I don't know how I can store the responses in other variables. Right now the output I'm getting looks like: location1 [status1] [change] location2 [status2] [change] location3 [status3] [change] . . . . where all the [status] are drop down menus and the [change] is a submit box. I'd like to use the change button to change the status of the location in the mysql database. How can I at least get my hands on the location that they modified and the new status of that location? Code:
View Replies !
View Related
Select Table From Drop Down Menu
I'm trying to select a table to submit form data to from a pull down menu. How do I submit the table along with the input data? I know I need to modify this line ($sql = " INSERT INTO $dnc "; )somehow to use the table selected in the pulldown menu. Code:
View Replies !
View Related
Drop Down Menu Selection Activation
I have a form that is populated with a drop down list and a list box. I want to be able to automatically populate the list box, whenever a user selects a new item from the drop down list. Is there a way of doing this as soon as a new item is selected from the drop down box? (I'm trying to mimic a rich client interface in a web browser).
View Replies !
View Related
Showing What Was Selected In Drop-down Menu
I'm trying to create a form where the user inputs data, i validate it with php, and if some of the input is missing or invalid then i print out errors with the form filled out with the information they entered/selected previously so they can change/add to it. The problem I'm having is setting my drop down menus to be selected when the form is returned instead of returning their original state. The menu I have is named A ($A). Here's an example of what I'm doing that isn't working: PHP Code:
View Replies !
View Related
Default Select Drop Down Menu?
I have a drop down menu populated via a script that pulls all categories from the category table. However, when a user clicks to view a specify category (i.e. Toys), I want the drop down menu to display toys as the default value. Code:
View Replies !
View Related
User Selection From Drop Down Menu
I have 2 drop down menus. 1 is to pick a Province and the other is to pick a trade (plumbng electrical etc) The user selects which province and then what trade then hits submit which should list all entries in the table. How would I formulate the select statment for MySQL to display the results in a webpage. The variable in my form are $province and $category
View Replies !
View Related
Drop Menu Using Session Data
I've a drop menu for users to choose the month they are born from. There's an associative array, $nameOfMonths, for the months' names. E.g. [1] => 'January', $birthMonth would be an Int. If there's session data, it will print the user selected month, followed by a list of months. If there's no session data, it will ask user to select a month, followed by a list of months. I wonder if this is the best way to code this drop menu. Code:
View Replies !
View Related
Chain Selection For Drop Down Menu
I have a java script that has a drop down menu where a person select a state and then all the cities for that state show up right next to it. my problem is that the script it is making the webpage runing slow, or sometimes is telling me that the insternet explorer is running slow because of it and i was wondering if there is a better way to do this with PHP and where should i start
View Replies !
View Related
Mysql Fetch With Drop Down Menu
Im trying to do somekind of dropdown menu taking information from the database but im not quite sure how this could be done with my knowledge. alright so lets say i have a table named: projects SELECT name FROM project. and it will put all the data found in a html drop down menu?
View Replies !
View Related
Passing Data From A Drop Down Menu
I have a website that I am working on. When the user logs in they see a drop down box and they are supposed to go to this box and select their name. How would I get the selection that they made to pass to the next page. This is my code for the page with the drop down box that I have so far. It pulls from my database, and it works fine. Code:
View Replies !
View Related
Drop Down Menu Validation Against Database
I want to do a query which selects the config.maps table.field WHERE ladder_id = $ladder_id. I can do this fine, but the next bit is slightly harder. The maps are stored as an array, separated by commas. I can explode these commas to put the maps in to an array called $maps but how can I then check that a value inputted from the drop down menu matches one of these maps? I cannot do: if ($dropdown = $maps[1] || $dropdown = $maps[2] || $dropdown = $maps[3]) { // Continue }
View Replies !
View Related
Horizontal Drop Down Menu From Database?
I've been searching now for months and have just given up. I've also tried to create my own menu using pre-made drop down menu software then using dreamweaver to try and get the values from a database but have had no success. I've made a CMS which allows users to greate sub menu items, and then sub-sub menu items to those submenu items. And now the final thing to do is create the drop down menu on the front end of the site. Is there a particular site or software package that anyone could point me to that is very good and allows you to create the menu's based on data in a database? So it will allow me to select which table contains the main buttons, which table contains the sub menu items, and also the sub-sub menu items.
View Replies !
View Related
|