Slide Bar To Select An Option On A Range Of 1 To 10
how on some surveys they give you a range from one to ten, where one is really bad and ten is really good. well, i am trying to code something like that where it is an arrow that you can move along a bar to select a number within that range. does anyone know if this can be done with php? and if so, how?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Select <option> </option>
I have this script in a form, it is trying to send a selection from the from to the next page. But the proble is that if the selection has a space in it, it only sends the first work to the next page. Code:
View Replies !
View Related
SELECT Rows Only Within A Certain Range
I want to find an easy way to select only rows within a certain range when I do a select. Im sure I have seen this done with a SELECT statement but cant remember if or how it was done. If not SELECT, whats the simplest way to do this? I have in the past selected all rows, and using a counter and conditional statement I will only output if within range //while shifting through the table select if (($i 10) and ($i < 21)) { //within range, output } Is this the simplest method?
View Replies !
View Related
Select Date Range
I have to run a query in mysql where records from a date range are selected. I need to know how to make the query of following type: select * from datetest where date between ཇ-11-2001' AND ༽-10-2009' order by date desc It will be great if someone can tell me which is the best format for dates: Code:
View Replies !
View Related
Select Number Range
I have weight ranges of 100,300,500,1000. The user will enter the package weight in the form and the query will return the price per pound. How can I select the correct weight in the query. $getprice="SELECT * from priceMatrix WHERE VENDOR='$vendorArray[$i]' AND SERVICE=$serviceArray[$s] AND WEIGHT<=$HTTP_POST_VARS[weight]";
View Replies !
View Related
<select> Option
I know PHP is a server-side language, so it's not client-sided. What I want to do is have a <select> dropdown with options and I want the page to refresh itself and display some information on that option. The problem is that since PHP isn't client-sided, I don't know how to get the value of the selected option and display the relevant info on that option. Any ideas on how to do this with PHP?
View Replies !
View Related
Select Option
I want to load textarea's value in drop-down box. In first page, such form is existed. <form name="form1" method="post" action="next.php"> <textarea name="dayList" Id = "dayList" cols=20 rows=10></textarea> </form> in text area there's one column of values. in "next.php", put values of 'dayList' in select option. I made a code by myself. However, as you see, it's just nonsense. How can I modify this? Code:
View Replies !
View Related
With Select Option
i am developing simple site for php where i put onle selct box,I have to check the value from the select box and put it in the database.I am having problem that if a value is alrady selectd , if you want to select it agin i have to prompt up the message that value is already selected.
View Replies !
View Related
Right Option In Select Box
I've a small problem but I can't fix it. When I want to edit an article I click on the article and you get redirect to a new page where you can change te values (title, category, author, etc). The categories are in a select box and I want to, when you edit an article, that the right category from that article is selected. <select name="category" class="category"> <?php $allCategories = getAllCategories(); foreach ($allCategories as $category) {?> <option value="<?=$category['CATEGORY'];?>"><?=$category['CATEGORY'];?></option> <?}?> </select> This is the MySQL below (a part of it) when I edit a page. else ...............
View Replies !
View Related
Drop Down Box With Select Option
I have a couple of drop down boxes which you select the option you want, that value is then stored in the database. If you make a mistake there is an edit option which once clicked shows the form with the information filled in/selected. However my problem is that when you edit, although the current option which was previously entered into the drop down box is set as the starting value, which is disabled, if you dont change the drop down box the value is deleted rather than held as it hasnt changed. Code:
View Replies !
View Related
Remaining Value For Select Option
i've used $_SERVER[PHP_SELF] , so my form and script are just one file . when a user click the submit and have some errors the sript reload again , for a reloaded script i've put :(for exaple) <input type="text" name="username" value=$_POST[username] /> so when it reload the last information the uer has typed won't be delete.it stays. i want to do the same with my "select menu " , i don't know how , the select menu reset when script reload :(example) gender : <select> <option value="">select one</option> <option value="m">male</option> <option value="f">female</option> </select>
View Replies !
View Related
Select/option Action?
I am trying to figure out how to click an option in a select menu and have that option act as a hyperlink/form submit without a submit button. Here is an example of what I am trying to do: Code:
View Replies !
View Related
Selecting Option In Select?
I am trying to populate a drop down list from values in an array, and compare a $_REQUEST or $_SESSION value to each of the array values. If they are equal, then the option in the drop down menu will be selected. Can't get it to work... Here is my code:
View Replies !
View Related
Select Data Into Option Box
Say I have a form <select name="Birth_Month"> <option value="">(Month)</option> <option value="01">Jan</option> <option value="02">Feb</option> <option value="03">Mar</option> <option value="04">Apr</option> <option value="05">May</option> <option value="06">Jun</option> <option value="07">Jul</option> The user selected one field, and that field's value is stored in the mysql database. My question is, if the user wants to come back to the page, and select "Edit". .. Then he/she should get a form that his Birth_month's value has already been selected for him. I did the select * query <?php echo "value="$row[6]"";?>> The $row[6] is the row that contain that user's month info. But I don't know how can I use that row to insert into those option box?
View Replies !
View Related
Dropdown Select Option
I've sort of hit a roadblock. I'm working on a user system using PHP and MySQL. Where I'm stuck is on the "Edit User" page where the admin or user can go in and change the personal information of a user. Here's the dropdown menu. <SELECT NAME="NameSuffix"> <OPTION VALUE="">SUFFIX</OPTION> <OPTION VALUE=""></OPTION> <OPTION VALUE="Jr.">Jr.</OPTION> <OPTION VALUE="Sr.">Sr.</OPTION> <OPTION VALUE="M.D.">M.D.</OPTION> <OPTION VALUE="Ph.D">Ph.D</OPTION> <OPTION VALUE="I">I</OPTION> <OPTION VALUE="II">II</OPTION> <OPTION VALUE="III">III</OPTION> </SELECT> <?php print("$data[6]");?> Gets me the database value from the NameSuffix field. Let's say, for example the value is "Sr.".
View Replies !
View Related
White Space In Select Option
I'm having a problem with a <select><option> which has white space in values... When I post the data I only get the first word (up to the white space). "Testing white space" becomes "Testing" after posting <select name="descr" id="descr"> <option value=Testing white space>Testing white space</option> <option value=Testing white space two>Testing white space two</option> <option value=Testing white space th>Testing white space th</option> </select> I am using form method = post and have also tried method = get How do I get the full string from the value field.
View Replies !
View Related
Getting Right Order Of <option>s In <select> After Submit
I'm trying to emulate part of our client-server application as a web site so customers can use it, and I'm stuck when it comes to re-ordering items in a list. Basically we have a list of available articles ("availableItems") and a list of articles already in an issue ("selectedItems"). What I want is to be able to move articles freely between the two lists and then on submission add them to the issue (which I can), but also move items in the "selectedItems" list around so that they can be re-ordered (i.e. I want the customers to be able to change the order in which the articles appear in the issue). I can do both these things on screen (i.e. I have written Javascript to move them from one box to the other (add/delete them from "selectedItems") and to move individual articles up or down the list of articles in the issue. Befor submitting I run a Javascript loop on the list to select them all, from top to bottom. On screen it always selects them in the right order (i.e. top to bottom, no matter whether I have changed the order of these items) but when I grab the array containing the item id numbers it's as if the change in order had never happened!!! Newly added or deleted papers get added/deleted fine, but when I fetch the array from "selectedItems" I always end up with the items in the same order, with the latest items added at the end. However, being able to change the order of these items is crucial for this project, but so far I have been unable to do this and I haven't found any information on how to grab the new ORDER of items. Here's some of the code: I retrieve the array like this: /* $ia_items_new = $_POST['selectedItems']; */ However, this still lists the items in the OLD order: /* if ($ia_items_old) { foreach($ia_items_old as $key => $value) { //echo("<BR>Old: No.".$key." - ".$value); } } /* Populating the "selectedItems" box: /* print( " <td><select multiple size=ཐ' " ); print( " id='selectedItems' " ); print( " name='selectedItems[]'> " ); //Grab values if the information was found $in_total_count = $objRSIssueBatord->RecordCount(); $counter = 0; if ($in_total_count > 0) { //Now put in an entry for every value in the batting order list: //Get the recordset ready and extract data: $objRSIssueBatord->MoveFirst(); while (!($objRSIssueBatord->EOF)) { $counter ++; //Get the variables and make string to describe items $in_paper_id = $objRSIssueBatord->fields("bip_paper_tracker_id"); $is_jsp = $objRSIssueBatord->fields("jsp_code"); $is_customer_no = $objRSIssueBatord->fields("pap_customer_no"); if (!$is_customer_no) $is_customer_no = "N/A"; $is_author = $objRSIssueBatord->fields("pap_author");
View Replies !
View Related
Simple - UD Function With Select / Option
As you might guess I am completely new to this language. Maybe I get some help here. I try to execute a user defined funciton from a select option in a document to read a file into an array without using a submit button or anything else. like this: <select name="sel[]" onchange="<?php ReadFile(DependingOnValue);<?" > <option value="1"> 1st Quarter </option> <option value="2"> 2nd Quarter </option> <option value="3"> 3rd Quarter </option> </select> I know I could use Javascript instead. But I am sure there is an easy way doing in PHP.
View Replies !
View Related
Keeping Select Option Value Selected
I'm trying to learn how to keep the value "selected" once a form is set to read the values and then f-write them (all within a loop). The part that's giving me a problem is the part which would return the value of the form as "selected". PHP Code:
View Replies !
View Related
Multiple Select Box With Selected Option ...
first of all I have three tables (tournament_game, umpire_game, umpires). Updating tournament_game umpires, each game may have from two to four umpires, and those umpires can work from one to n number of games, that's why I'm using connection table umpire_game. I'd like to get selected multiple select box of umpires in game, it could be two to four options, with all umpires listed as options example: <select name=umpire_game[] size=10 multiple> <option value=$umpire_id>$umpire_name</option> <option value=$umpire_id selected>$umpire_name</option> <option value=$umpire_id selected>$umpire_name</option> <option value=$umpire_id>$umpire_name</option> <option value=$umpire_id selected>$umpire_name</option> <option value=$umpire_id selected>$umpire_name</option> PHP Code:
View Replies !
View Related
Select Option Stays Selected
I have a normal drop down menu: <select name="status" class="db_list_text"> <option value="All" selected="selected">All</option> <option value="True">Active</option> <option value="False">Inactive</option> </select> The idea for this is for the user to select either true or false and then to click submit to find data that matches either one. The coding is in the same page so the form basically just reloads the page and grabbes whatever info is requested. How can I with PHP, make it that the dropdown stays on the selected option when the page is reloaded?
View Replies !
View Related
If/Else Statment Within An Select/Option Group
I want to create an update query in a form so that I can update my groups attendance. The variables 100% are working and are pulling the correct info. In the update attendance column, I would like an If else statement that says if the attend_status == present echo SELECTED VALUE="", so that the pull down menu will display the current attendance value. From there I will select the new update attendance info and then submit it using an update query. Below is the code. I am running into other problems with the quotation marks in such because this is all located within the <php> tags. Code:
View Replies !
View Related
Form Auto Select Option
I have a website that has a contact form with a dropdown list of names. I would like to code it so that when a user selects a person's name from another page, that when it brings them to the contact form, that name is automatically selected in the dropdown list.
View Replies !
View Related
Convert CSVs To Select Option Values
I was just wondering if someone could point me to a good web resource that could help me figure out how to convert a string of comma separated values (being pulled from a database) into a select menu (pulldown box) so that the values from the CSV would automatically fill in the displayed text area of the option tags as well as the value attribute so the value selected could actually be passed as a variable. I imagine it has something to do with converting the CSV list into an array using substring parsing & then dynamically building the array from the elements of the array, but I just haven't been able to put it all together yet. If anyone is familiar with anything published on the web that might help, I'd be deeply appreciative.
View Replies !
View Related
Form That Allows The User To Select A Sorting Option.
I have a form that allows the user to select a sorting option. One of the options is a day of the week. (The table is a list of courses and their times/locations/days.) I can get the results to sort by user option, but how do I make the days sort chronological rather than alpha if this is the option selected? This is my code: $query = "SELECT * FROM classes ORDER BY '$schedule'"; The user selects which way to display the data through the $schedule variable.
View Replies !
View Related
Slide Show
<?php // Query $query_return = mysql_query("SELECT * FROM `table` ORDER BY `table_id` ASC"); if(!$query_return){ echo mysql_error(); exit; } while($request = mysql_fetch_array($query_return)) { // File reload $file = "file_dir/".$request['table_id']."_file.jpg"; if(is_file($file)){ $file_print = "<img src="".$file."" alt="" border="0" />"; }else{ $file_print = "";} print $file_print;} ?>
View Replies !
View Related
How Can I Make A Slide Show?
I have some code shown below that is working to randomly show some images on my web page. Right now it does the follwing: 1. Reads the chosen directory 2. matches filetype to a given array 3. loads the matches into a picture array variable 4. shuffles the picture array 5. then outputs the image to the web page So that works fine, but the pictures will only change when the page refreshes. Which is the way I have always done it before, so that works ok. But - just to take it one step further, how could I add some sort of timer to force a page to refresh the screen which would in turn reload the images in xx seconds? Or would there be some better way to create a slide show type effect? Code:
View Replies !
View Related
Using A Range In Php
Hi, I am trying to create a online blood glucose level reader. I have created a page with the following text fields (which become variables on the following page). name which becomes $name glucose which becomes $glucose
View Replies !
View Related
Range Of Value
I have the following scenario. Let say I have A1, A2, A3, B3, B4, B5, MC01, MC02, MC03 I also have the following value "A1-A3" ,"MC01-MC03", "B1-B4" Let say I need to write a function to detemine A1 is belog to A1-A3, MC2 is belong to MC01-MC03, B4 is belog to "B1-B4". How could I accomplish this.
View Replies !
View Related
Range A-z + 0-9
i have a lyric page that sort artist from a-z each letter; however, i want to add 0-9 in front of a, b, c... example: 0-9 in 1 group A B C . . . Z i try to use this code, but the song title from 0-9 does not appear. Anybody know why? (again, i want my array to be like 0-9, A, B, C, D...Z). PHP Code: foreach(array_merge(array(Ɔ-9'),range('A','Z')) as $_letter)
View Replies !
View Related
Age Range
I have a field with user's date of birth. I would like to be able to show where the age fall into i.e. 25-30 years old instead of 27 years old I suppose I need to create an array with the ranges but not sure how to do the rest.
View Replies !
View Related
PHP Date Range?
Is there a way I can get PHP to echo a date range, and have it update weekly? I want it to show "Monthnow", "Datenow" - "Monththen", "Datethen" (Where Month/Datenow is the last recognized Wednesday, and Month/Datethen is the next upcoming Wednesday). Example, for the current week, the page displays: July 23 - July 30. I'd like it to update that automatically on a weekly basis, if possible, using the date/time features of PHP. (I have no database).
View Replies !
View Related
Dynamic IP Range
I do not know where posting it? Is there a way to find (and where to find it) the high end and low end of the USA dynamic IP range. I am not even sure that it is possible to get such an answer.
View Replies !
View Related
Range Of Dates
I'm trying to create a report in PHP/HTML showing all deliveries made from our database. I'd like to automatically generate a different report for each month of the year. So I need to do two things: First I need to be able to find the earliest occurence of the date in the field called date_delivered in my SQL database - is there a particular function I should be using to achieve this? And then secondly I need to automatically create a link to each month which will take the user to a page showing all deliveries that month?
View Replies !
View Related
Identifying A Value Range
i have a form that submits to a php file, the form basically has a hidden field called number: <input type="hidden" name="number" value="12"> i know how to read the value of that, its simply putting <?php echo $_POST['number']?> but what i want to do is check if the number is between 1 and 25 and if it is then echo A else if it is between 25-75 then echo B else if it is anything above 75 then echo C .
View Replies !
View Related
Out Of Range Error
When I run this query on MySQL 5.0 server through PHP 4.3.10, I get an error. mysql_query("INSERT INTO `tbl_graphics` VALUES('', '$height', '$width', '$format', '$details');") or die(mysql_error()); MySQL Error: Code:
View Replies !
View Related
IP From Private Range
Is it possible to get client's IP (private, you know 10.*.. 172.16.* 192.168.*...) not proxy or NAT address (using cookies maybe) ? I saw few pages that can do this but I'm not sure if they used PHP and/or something else so here's my wuestion. any ideas how ?
View Replies !
View Related
Preg_match() To Specify A Range
How can I use preg_match() to check if a number is between two values (specifically 2004 and $currentYear, which is equal to date(Y))? The pattern must be between 2004 and $currentYear, I want to return an error for any year out of that range, so I can't simply use [0-9]{4}. code; if ( preg_match("/2004¦2005¦2006¦all/i", $_GET['year']) ) { $year = strip_tags($_GET['year']); } else { die("Please enter a year in the form of four digits between 2004 and $currentYear, or enter 'all' to see all years."); }
View Replies !
View Related
|