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.





Autosetting Options In Dropdown


I use this code for creating an dropdown with preset options from a database: Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Pick From A Drop Down List That Automatically Gives Options In A Second Dropdown Box
does anyone know how to create a form that allows the user to firstly pick from a drop down list that automatically gives options in a second dropdown box. eg.

'category1'
is selected from dropdown box 1,
this then populates dropdown box 2 with the options
'category1.a' or 'category1.b'

or if
'category2'
is selected from dropdown box 1
then dropdown box 2 gives the options of
'category2.a' or 'category1.b'

i f any one knows how I should code this please help, if not point me in the direction of a tutorial that can.

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 !
Sorting Options
I have an array I would like to sort, but the sorting options that I have found are inadiquate. I need to do a case insensitive sort, that does not maintain the index correlation. My problem is I have some items in my array beginning with "a" and some with "A", and I want the sorting based strictly on the letter not the case, and then I have to be able to reference them in an order that maintains the sort.

View Replies !
Select Options
I am trying to pass some 'on the fly' list contents to a php handler script. The lists are created using JScript and I want to know how to get the value of the contents (not just the selected ones, but ALL the contents).

View Replies !
Php Web Payment Options
What would be the best way to add a credit card (and maybe also other
systems) payment option to my php website shop?

Is this something that can be done by a regular developer like me? And
if so where can i find information on how to do this.

Or is it customary/best to let a specialised company handle the actual
payment part of the transaction. And if so what can i expect to pay to
such a company for each transaction, and which are respectable
companies in the "Netherlands" region.

View Replies !
Dynamic Options
I'm creating an online database app for a dog grooming business. The problem I'm trying to solve at the moment is this: Each booking is linked to one customerEach customer may have more than one dogThe customer may bring more than one dog to be groomed

The problem I'm having is how to get this information into the database. I've spent quite a lot of time on the design side of the database and I'm confident it's structure is a workable one.

At the moment the user can select a customer from a drop down list. The ID of this customer gets put into the booking table. Along with this the time, date etc all get put in. Easy. However I'm not sure how I can let the user select which dogs are linked to the booking. What I'm looking for is:

The user selects a customerA list of the customers dogs is pulled from the MySQL databaseThe user can select as many dogs as they like from this list.

View Replies !
Recompiling Php With New Options
I've just installed php but after the installation I found that I should had compiled php with zlib enabled. I know that I can recompile php by doing ./configure with the new options but my question is: Is that all have to do in order to recompile php or do I need to change certain settings in php.ini file so that it may work with the options?

View Replies !
Insert Options
I choose this code for upload 3 files for certain directories but don't know how to do if certain file fields are empty(the files aren't obligator fields): Code:

View Replies !
No Encoding Options
I have installed phpMyAdmin on my service at pair.com and it works, except on other hosting companies there is normally an option to select the type of encoding when importing text files. For example if you set the language to Japanese (SJIS) and then go to SQL there is an option to import with EUC or SJIS encoding.

View Replies !
Radio Options
I am looking for a tutorial which would help me work out how to develop a php form i need to do. My form will select questions from a mysql database and display them accordingly on screen. For each question, there are a maximum of 5 answers, of which only one can be chosen (radio buttons).

But for some questions, the count of answers might only be 2, therfire only displaying 2 radio buttons but this might happen on the same page as questions with 5 options. I basically need a away of dynamically building the page when i select my questions and echoing the correct amount of radio buttons for each question.

View Replies !
Page Options
i been self learning the $_GET code but im trying to use it for id's how can i use this method if say :

68 /gid342/cid1110/WD/GM/1169845411ErhNBuxI5BJV5kVpgg... 2.47 2007-01-26 13:04:31 1169845411ErhNBuxI5BJV5kVpggoT

the above is my table and in table video i have from beginning to end ID - URLPATH - DURATION - TIME/DATE - VideoID

can the id contain letters is that a issue? also is there anyway to code out the letters?[if thats an issue of course] but my main issue is i want say like a tvworld.php?

View Replies !
Drop Down Options
I've got a drop down box which when I select the relevant item correcly updates the database but when I return to edit the form again the drop down is showing the wrong option even though the correct option is in the DB ....

View Replies !
Gallery Options
I am trying to create a gallery that limits to 5, the number of thumbnails on each row, and only allows for 2 lines of thumbs. i have more than 10 pictures per page though, but i don't know yet how to code those page numbers at the foot of the page to show that there are more pages 1 2 3 4 5 etc, with the page currently on being highlighted. CAn anyone advise me on how this code might look? my current code is:

<?php

$images = array();
$sql = mysql_query("SELECT * FROM news");

while($image = mysql_fetch_array($sql))
$images[] = $image;

$total = count($images);
for($i=0; $i<$total; $i++){
if($i % 5 == 0)
........................

View Replies !
Selection Options
I have a script where a user can go and update their details, the problem I am having is with a drop down box and retrieving the value: PHP Code:

<p>How many years working once fully qualified?:</td><td><select size="1" name="yearsasqualified"
<option value=&#391;' <?php if ($_POST['yearsasqualified'] == 1) echo "selected"?>>1</option>
    //<option>1</option>
    <option value=&#392;' <?php if ($_POST['yearsasqualified'] == 2) echo "selected"?>>2</option>

The problem I have is an undefined index on option 2 if say option 1 is selected.

View Replies !
SELECT * FROM Options

<?
$query = "SELECT * FROM options";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$options_newaccount = $row["options_newaccount"];

echo "$options_newaccount";
}
?>

Can any one see any thing wrong with this?

View Replies !
Rightclick Options
I need help in javascript. I am looking for a scripts for disable view source in browser and disable right click option in broswe. I want script that need to work both in ie and firefox.

View Replies !
CURL_setopt Options
I've scanned through the list of options curl has to offer within PHP, and can't see one that limits the actual size of a download.

I'm looking to limit the size of downloaded files to 100 kilobytes.

A quick look at the curl.exe flag options brings this option:
-r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server

Which I suppose could be used, but isn't supported by all servers.

Is there an option to limit the size of the download, or some kind of work around?

View Replies !
Str_word_count Options
str_word_count is listed as having three options, I don't see how the second and the third differ. I'm trying to use this to pull words from a comma or space delimited file (haven't decided which yet) and tryint to decide which I should use.

View Replies !
Particular Field Options
I have one web pages which will be the main page. I want to display certain field from the database into main page. I don't have any ideas on how to display the particular fields. I don't have any problem to display it in table.

<TABLE cellSpacing=0 cellPadding=3 border=0>
<TBODY>
<TR><TD vAlign=top colSpan=2><? display title from news table?></TD></TR>
<TR><TD vAlign=top width=80 rowSpan=2><? display image from news table?></TD></TR>
<TD class=announcedate vAlign=top> <P align=justify>
<? display description from news table?></P></TD></TR>
</TBODY></TABLE>

View Replies !
Question About Setting Options
I've been trying to get this to work for a while now, but I can't figure it out. Tryed out different suggestions, but can't get it to work the way I would like. Anyhow, I have a list of results I set in a table and at the top I have an option for entering min and max price and/or the option for sorting the table my name, price, or brand. Works great if I enter in a min and max value, but it returns an error if I don't enter in any values or enter in a non numerical value. Well, what I would rather have it do is not return an error and take me to the page using the options it does recognize and ignore the options it doesn't recognize or if it is empty. Here is my code:

if (!isset ($_GET['min'])) {
$min = $default_min;
} else {
$min = $_GET['min'];
}
$default_max = &#55613;&#57176;'
if (!isset ($_GET['max'])) {
$max = $default_max;
} else {
$max = $_GET['max'];
}
$default_sort = 'name'
if (!isset ($_GET['sort']) ) {
$sort = $default_sort;
} else {
$sort = $_GET['sort'];
}
echo "
<form method=get action=/$word/filter>
<table cellspacing=0 border=0 cellpadding=0 width=100%>
<tr>
<td align=left bgcolor=EEEEEE>
<input type=hidden name=category value="$fetch[category]">
<table border=0 cellspacing=0 cellpadding=2 width=485>
<tr>
<td><font color=#666666>Min Price</font> $
<input class=filter type=text size="5" name="min" value=""></td>
<td><font color=#666666>Max Price</font> $
<input class=filter type=text size="5" name="max" value=""></td>
<td align=left>and/or Sort by</td>
<td align=left><select name=sort class=select size=1>
<option value=name>Name</option>
<option value=our_price>Price</option>
<option value=brand>Brand</option>
</select> </td>
<td colspan=2 align=left><input type=submit value=Apply name=update style="color:#333333; background-color:#E0E0D0; font-size:11px;"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>

My query is like so:

$result = mysql_query("select * from evitamins_products WHERE category='$category' and our_price BETWEEN $min and $max ORDER by $sort ASC") or die (mysql_error());

View Replies !
Inputting Multiple Options
I need to input multiple options to 1 field in mySQL. The way it is set up now, it will only input 1 field and not multiples. mySQL is set up with the SET function and it works fine. I just can't upload from my web page and store the info. Anyone have an idea what I'm doing wrong here?

<input type="hidden" name="Type" value="$set$" >
<select name="Type" size=3 multiple="multiple">
<option value="All Communities">All </option>
<option value="Conventional">Conventional</option>
<option value="Golf Course">Course</option>
</select>

View Replies !
IF / ELSE Options In Mail Form
I have a form with the following fields:
-------------------------------------------------
Name
Email
Age (option field) -> over 45 or under 45
Sex (option field) -> male or female
Comments:
-------------------------------------------------

I currently submit this form to Formmail.cgi (Im sure you're familiar with it) and I get it in an email.

What I need to do is that IF:

- Age is Over 45 and sex is male then send "this" via email to the <email>
field and i want to receive an email with the results of the form.
- Age is Under 45 and sex is male then send "this" via email to the <email>
field and i want to receive an email with the results of the form.
- Age is Over 45 and sex is female then send "this" via email to the <email>
field and i want to receive an email with the results of the form.
- Age is Under 45 and sex is female then send "this" via email to the
<email> field and i want to receive an email with the results of the form.

View Replies !
With-curlwrappers Options For Curl
If I compile Php with-curlwrappers can I then set options for Curl
somehow?

View Replies !
Multiple Product Options
I've built a number of online shops with but I want to increase the
flexibility of the system that I use, mainly relating to product options.

Currently I just use an admin area to assign one or more options to a product
and these get displayed on the product page of the site, however what I really
want to do is relate those options so that only the options available are
displayed. This has my head in a bit of a spin as I haven't entirely decided
on the best way to do this.

My current thinking is to - in the admin area - list all the permutations for
a product each with a stock level form element, then when submitting the form
I use PHP to only grab the options that are available and store them in MySQL
as an string that can be eval'd when extracted and processed on the product page.

The product option drop-downs would be displayed in an iframe so that it can
refresh quickly based on the options chosen and what's available. I was going
to output a JavaScript array and use that but I want the system to work
whether JS is on or off.

Does this sound the best way to go about this or are there better more
efficient ways?

View Replies !
Are There Alternative Extension Options With .php?
Are there any alternatives to the .php file extension that will call
it, such as page.xyz? ....or does that need to be setup at the server
administration level, or is this not possible at all?

View Replies !
Js Options - Required Input
i m trying to figure out which javascript toolkit to use

i m now trying to figure out which to use between
The major contenders are:
Dojo
Mochikit
and prototype [rails fame]

View Replies !
Rand Of 5 Options Using % Chance
I want to create a random where by it knows the % chances of each then picks oen of the 5 by that % chance... so all can still happen of course.

Can this be done?

View Replies !
Setting How Options Are To Be Reported
Basically I'm working on a project that will go into publication soon. When I release it I'd like to create a system that will allow me to basically choose an alternative option to the general error report of the black text on the plain white backdrop.

I'm gearing towards a system that when encountering the error it just displays an error page and e-mails me the error. This will help eliminate some security concerns while the script is in use.

View Replies !
Possible To Reveal/hide Options
I have a form and based on certain responses, I'd like to show/hide other questions within the form *on the same page*. Is this possible?

For example, if I ask:
Do you like the color blue? Yes No
If the user selects no, the following is displayed:
Do you like the color red? Yes No
If the user select yes, the following is displayed:
Do you like the Smurfs? Yes No
(The Yes/No responses are actually radio buttons)

If this is possible?

View Replies !
Collecting Selected Options
how I can achieve the following:

Page1

Within form is a list of 100 questions each with their own checkbox, however the user must select to answer only 10 of these questions. So they select the 10 questions they wish to answer.

Page2

Then display the 10 questions they selected.

I believe this is something straightforward,just i cant get started.

View Replies !
Use A For Loop To Generate The Options
I am designing a form, and one of the fields is for date of birth. I am having 3 select boxes. one for day, one for month and one for year. im wanting to use a for loop to generate the options. so for the day i would need a for loop that goes from 1 to 31.

here is the current code i am using, which works fine. note this line (<?PHP for($day=1; $day<32; $day++) {?>) Code:

View Replies !
Display Many Selection Options
Let's say I want my members to choose the state, county & town they live in. I could present a huge list box for them to select from but it would contain literally hundreds of items. That seems excessive. It would probably be better to present the states, counties & towns as levels in a heirachy of choices.

That is, you choose your state, then get shown a list of counties, then you choose your county then you get shown a list of towns in the that county. I could do that with a series of pages or reloads of the same page but surely there must be a more elegant way to do it. Must I use a javascript function for this or can someone suggest a pure php/html method?

View Replies !
Form Options Suggestion
I am hosting a youth sport site and I want to display schedules by select teams. how I populate the team selection in my statement:

$sql = "
     SELECT *
     FROM schedule_table
     WHERE division = '{$_POST['division']}'
        AND ( home_team = '{$_POST['team']}' OR visiting_team = '{$_POST['team']}' )";
My schedule is in a table with the following fields:
* division
* date
* time
* home_team
* h_score
* visiting_team
* v_score
* field

I thought that I would want a drop down menu to select one of our 35 divisions, then a secondary search by team of that previously selected division menu.  I have 35 divisions with over 300 team to select from.  It cannot be by team name alone, since there are quite a few teams from several clubs and they use the same name.  I would like to give my visitors easier time locating their schedules.What is the best option for visitors to create the WHERE variables?

View Replies !
Image Upload: What Are My Options?
I'm almost finished making a script that will allow an apartment broker to track apartment listings, landlord, and clients. I need to be able to add/delete/view multiple images for each apartment listing, but I need some advice for choosing a direction to go:

Add several more columns to the existing LISTINGS database, ie image1,image2,image3 (I don't like this idea because it will limit how many pictures a listing can have.) Code:

View Replies !
Credit Card Options
i was wondering if anyone can help me out?i have a dating website that only accepts paypal at this time,what i want to do is keep the paypal payment and add credit card payments to my site can anyone tell me how to go about doing this?thanks..(and if so is there away to make the payments from the credit card go into my paypal account?)


View Replies !
How Sessions Expire Is To Set Some Options In Php.ini.
I've seen a couple of questions regarding the
expiring of sessions in PHP. The way to control
how sessions expire is to set some options
in php.ini.

These options are of particular use:

session.gc_probability
session.gc_maxlifetime
session.cache_expire

session.gc_probability is a percentage. 1 means 1%,
and 100 means 100%. If you want to ensure
that the gc (garbage collector) is run on every
activation of the session subsystem, set
gc_probability to 100: Code:

View Replies !
Search Script Options
What woudl be my best option to add a search script to the site? someone has suggested entropy but I am finding it way too sloppy, my site has around 300 pages at the moment but will probably grow by 4 a week.

View Replies !
Javascript For Select Options
Here is my problem. mysql table A:

customer -- Address
ABC -- addr1
ABC -- addr2
ABC -- addr3
XYZ -- addr4
XYZ -- addr5

I would like to have 2 html select statement, 1st one, choose the customer ( dropdown for ABC or XYZ ), once the customer has been choosen, the second select will automatic come up the address for selected customer only.

View Replies !
How To Add URL To Options In Drop Down List
I am have a drop down list, whose options are read in dynamically from a table in a MySQL database. one of the items being read in is an URL. I am unable to display this URL in the drop down list. The following is the code snippet I am using: Code:

View Replies !
Passing Multiple Options
onclick="window.location.href='comms.php?Option=ReplyTo'"

OK, the above works if I want to pass 1 option to the comms.php script,
but I would like to send another option back and that is the message id that is being replied to called commsID.

View Replies !
Need To Add Options To If...Else Or Use Case Statement.
The first code set below determines the search variable value. The variables are $SeeAlso1, $SeeAlso2, and $SeeAlso3. These variables appear in the search script.

Where you see Line 7, 16, 21, I want to add other options so that if a user selects "Use No Wildcard" on the menu page, the script will use $SeeAlso%, or if the user selects "Use Wildcard1" on the search menu page, the script will use $SeeAlso% and if the user selects "Use Wildcard2" the script will use %$SeeAlso%. How do I change the If...Else below into a broader If...Else or use Case statements. Code:

View Replies !
Populating <options> Tag With SQL Data?
I have a problem that I cannot seem to figure out. If any of you have
an answer or suggestion, I would appreciate it.

My HTML/PHP code needs to pull options from a database to populate the
<optionstag for a drop down menu and I cannot get it to work.

Basically, there is a form on the website with a drop down box. I need
the options in this box to be pulled from a preexisting table in a
database. That's all. Sounds very simple but I'm totally lost on how
to accomplish it.

View Replies !
Multiple Checkbox Options
I am trying to process a form that has a series of checkboxes. Obviously, more then one can be selected. Basic code for this is below:

<input type="checkbox" name="fields[]" value="name">Machine Name<br />
<input type="checkbox" name="fields[]" value="domain">Workgroup/Domain<br />
<input type="checkbox" name="fields[]" value="make">Make<br />
<input type="checkbox" name="fields[]" value="model">Model<br />
<input type="checkbox" name="fields[]" value="os">Operating System

Now, I thought that assigned the values to the variable field. I try and check it with this in the processing page:

$fields = $_POST['fields'];
if (count($fields) > 0) {
$content = $content . count($fields);
for ($i=0;$i<count($fields);$i++) {
$content = $content . "<li>$fields[$i]
";
}

View Replies !
Setting Php Config Options In .htaccess
I got a problem setting php config options in .htaccess files (or in httpd.conf for that matter;). I'm trying to set the auto_prepend_file php.ini config option via the .htaccess file like this:
Code: php_value auto_append_file "d:/web/test/auto_prepend/footer.inc"
and it fails miserably:
[Sun Nov 18 10:24:14 2001] [alert] [client 127.0.0.1] d:/web/test/auto_prepend/.htaccess: Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration

I'm not sure where I'm going wrong here - does anyone know what needs to be done to be able to use 'php_value' in the httpd conf files?

oh, PS I'm using apache 1.3.19 for win32 on a win95 platform, most things are ok, just this doozie... thanx for any help...

View Replies !
Tabular Columns In Select Options?
Anyone have the foggiest idea on how to create tabular columns in select options so that the displays are aligned under each other?

View Replies !
Doing A Split The Way I Used To Do It In Perl - Overwhelmed With Options
I'm trying to export data from a pipe delimited file (|) with php,
trying to get away from perl entirely.

My old perl script opens the file and sticks it in an array, then
handles each line as a record in the database table by splitting the
line like this:

($MLSNo, $Status, $DOM, $Address, $Unit, $City, $Area, $LP, $SP, $BT,
$SqFt, $Bed, $Bth, $PB, $Gar, $Garno, $YrBlt, $TBMap, $Acres,
$LotSqFt, $HOA, $Freq) = split (/|/,$i);

How can I achieve the same with php?

View Replies !
Having Multiple Sort Options For A MySQL DB
I was wondering how you can sort MySQL rows in several different ways on one page using PHP. For instance, so that a user can click on a hyperlink to sort alphabetically, by price, by category, etc. Also, is it necessary to index each field in phpmyadmin that I want to sort?

View Replies !
How To Keep Or Save Some Display Options On Quanta
I'm using Quanta Plus 3.3.1 in Fedora Core 3 for my PHP editing, and
I'm having a problem having it save my program settings.

For example, I select "Show Line Numbers" and "Show Icon Border" and if
I close and reopen the program, they're gone. I've looked all around
for ways to save profile, or save settings, or the like and can't find
anything like that.

What am I missing?

On a less important note, I also can't find a way to cascade the main
window with the left-side windows for Document Structure, Scripts, etc.
When I click on one, it opens a window on top of the main window, and
then becomes completely obscured when I go back to the main window. I
know it's possible, I've seen it set up to allow the left side windows
to have a small constantly open window side-by-side with the main
window. But I've looked all over, and I see no way to do it.
Any pointers on what I'm missing,

View Replies !
Passing JVM Options When Using Php Java Extension?
I managed to get the Java extension working on php 4.3.10 after following
various bits of advice from
http://www.thelinuxpimp.com/main/mo...article&sid=419
and http://uk.php.net/java

I have some Java code which runs fine from Java at the command line when
specifying certain JVM options -Xmx and -Xms. I am now calling this class
from php but can't see any way of pasing the arguments to the JVM created
from the php process. Is there something in the jre or php.ini that I can
edit to force these options, or is it hidden somewhere in the java extension
source?

View Replies !
How To Generate Month Options In A Menu?
I'm trying to generate options in a menu that read

<option value="2006-03-01 00:00:00.0">March, 2006</option>
<option value="2006-04-01 00:00:00.0">April, 2006</option>
....
<option value="2006-12-01 00:00:00.0">Decmeber, 2007</option>

where the beginning is defined by the month/year of today's date and
the end is defined by a constant "FINAL_YEAR".

How would I generate the above menu using PHP 4?

View Replies !
Frames To Display Menu Options
I am just starting web development after a long break (6 years). Last time I was developing frames were often used to display menu options on the side of the page.
I was wondering as frames seem to be no longer used how would a menu bar on the left hand side of the website and possibly a bar along the top would be achieved in a php site?

View Replies !
Options For Clearing Text Fields?
I am new to php and html. I'm modifying a journal article database application.

Text field input (title, authors, journal, etc.) and associated pdf file are uploaded.

Successful completion prints a sentence at the top but the text fields are not
cleared. Headers have already been sent so I can't use header (right?). I
want the text fields empty so the user can enter data for the next pdf to upload. Code:

View Replies !

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