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.





Cannot Get List To Stay In Menu


I am using 2 drop down menus which pull their options from a database. Once the user selects a language and then a product a list of available pdf's are displayed.

However the form resets it self. How can I set this up so the products for the language selected stays. I was thinking about using a session but im not sure how to go about that when dealing with pulling data from MySQL Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Chain Menu But The Menu Should Be Multiple Select Menu/list
I am looking for codes to be able to do the same thing with multiple select menu/list.

PHP codes or javascripts codes are both fine.

1) javascript + php approach: Prefer to be javascripts codes to display the chain menu. I can use the php to get the all three levels menu data from the database, and assign these values to the javascript.

2) php codes only: Or use the pure php codes (the problem is if just using php codes then I have to submit the form to the server every time, when top level menu select changes to create new menu.).

View Replies !
List/menu
im using this to create a list/menu that takes the values from my database. Code:

View Replies !
Echoing Value To List Menu
Hi, I was wondering can I echo out value from db to list menu and how?

View Replies !
List Menu Choices?
Why does Multiple Choice List only report 1 value? i got a normal form: Code:

View Replies !
Can You Read A Value Into A List Menu?
a system i am developing has both a user and an admin side. The user can add a record and then the status of this is initially set to a fixed value.

What I am wondering is, if i stick with a list of say 4 possible status', how can i get whatever status the admin changes the record to to be "sticky" on the menu the next time he looks at the call, as opposed to the menu showing the default value set in dreamweaver?

View Replies !
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 !
Mysql List Menu
how can I modify this code to list queries in alphabetical order and eliminate duplicate names.

<?php
mysql_connect("localhost", "xxx_xx", "xxxx") or die(mysql_error());
mysql_select_db("xxxx_xx") or die(mysql_error());
$query="SELECT Bloom_Name FROM ihs";
$result = mysql_query($query);

echo '<select name="ihs">'
while($nt=mysql_fetch_array($result)){ //Array or records stored in $nt
echo '<option value="' . $nt['id'] . '">' . $nt['Bloom_Name'] . '</option>'
/* Option values are added by looping through the array */
}
echo '</select>' // Closing of list box
?>

View Replies !
A Form Menu List
I have a date of birth script on my website and at the moment im faced with typing in about 100 dates ranging from 1900 to 2006 is their any way i could use php to create the range of dates in a form menu list?

View Replies !
Select List/Menu Using PHP And MYSQL
Here is my code:

<select name="country" class="sidelinks">
<?php
do
{
?>
<option value="<?php echo $row_AllCountries['country_ID']." ";?>"<?php if ($row_AllCountries['country_ID'] = $acountry) { echo "selected"; }?> >
<?php echo $row_AllCountries['countryname'];?></option>
<?php
}
while ($row_AllCountries = mysql_fetch_assoc($AllCountries));
?>
</select>

A few words to describe:
-$row_AllCountries['country_ID'](get from MySQL) is a unique country ID number
-$row_AllCountries['countryname'](get from MySQL) is the name of the country
-$acountry is the country ID number that i want to be selected when the form loads

I have all the values and country names named OK...the only problem is that when the form loads it selects the last country.

View Replies !
Adding Items To A List Or Menu
Not sure if it is a php question but since i am working in php here it is.

Ho can i add items to (the item label=visual text and the value=index
number) a list object on a website.

I am having a list with 4 items and i would like to add the text from a
textfield (textfield1.value) to the list object so it will hold 5 items.

View Replies !
PHP / Javascript Menu List Population
I would like a web page to have 2 menu lists

The contents of the second menu list depending on the selection made in
the first.

The contents of the second would be populated from a database.

I am fairly new to programming using PHP, Javascript and MySQL but I am
sure what I am asking has been done before. Could someone please give
me some pointers or direct me to a tutorial.

View Replies !
Trying To Create Dropdown Menu From List
I am trying to create a dynamic dropdown select menu from a directory containing other directories and files. This is to select a certain page from the list so I can edit it. I only want the files in the menu. Here's what I have so far but it doesn't populate the dropdown. Code:

View Replies !
Calendar Type List/menu
how do i do 3 list type menu one with the 12 months next with the days in that month and  the year. so want i want is when people select a month the next list show the days as soon the pick the month.

View Replies !
Ordering A Drop-down Menu List
I am building a form that has a list/menu populating from the database. I'm using Dreamweaver to help code (which I know adds a mess), but I can usually edit it to do what I want. this is what it has:

<option value="<?php echo $row_rsPhysician['specialtyID']?>"<?php if (!(strcmp($row_rsPhysician['specialtyID'], $row_rsPhysician['specialtyID']))) {echo "SELECTED";} ?>><?php echo $row_rsPhysician['specialtyName']?></option>
<?php
} while ($row_rsPhysician = mysql_fetch_assoc($rsPhysician));
$rows = mysql_num_rows($rsPhysician);
if($rows > 0) {
mysql_data_seek($rsPhysician, 0);
$row_rsPhysician = mysql_fetch_assoc($rsPhysician);
}
?>

although if you have any generic code, I can play with it to get it to alphabetize my list. (the list is specialtyName and specialtyID is going into the database.

View Replies !
Populating A List/menu From MySQL
is there a way to populate a list, or a menu form using php, and MySQL? Basically i have a list, and i am planing to import 2 variables, id, and name, bouth id and name are variables loaded from MySQL (yes there are multiple id's, and name's) Name would be the label displayed, and the value would be id. Thats what i need. After that i will make a submit button, witch will post the selected id to a different file. How can i achive this? Does anyone hae any samples maybe?

View Replies !
HTML 'list/menu' And PHP/mysql
tell me the correct syntax to use for assigning the selected option from a pick-list before inserting to a mysql database? I am trying to give the visitor the option of some 20-30 categories from a pick-list and then I want to store the selected category in a field (called 'cat') in my mysql table.

View Replies !
Array List Menu Problems
I am trying to store values from a List Menu into an sql database table as an ARRAY. However, when I select the multiple values from the form, it only stores the selected values as 'Array' in the SQL table. Here is the Select Statement:

<select name="NOTES[]" size="9" multiple="multiple" id="NOTES">
<?php
do {
?>
<option value="<?php echo $row_literarydevices['LDEVICE']?>"<?php if (!(strcmp($row_literarydevices['LDEVICE'], $row_Recordset1['NOTES']))) {echo "selected="selected"";} ?>><?php echo $row_literarydevices['LDEVICE']?></option>
<?php
} while ($row_literarydevices = mysql_fetch_assoc($literarydevices));
$rows = mysql_num_rows($literarydevices);
if($rows > 0) {
mysql_data_seek($literarydevices, 0);
$row_literarydevices = mysql_fetch_assoc($literarydevices);
}
?>
</select>

Can anyone offer a reason to why the values are not being stored?

View Replies !
Default Menu/List Option
I'm trying to create a form with three menus, each with the same values, and I have no problems there. Each menu has it's initial value set at "None" and then the rest of the values are pulled from my MySQL db. Everything works great if the user selects three values that came from the database or selects something from the first menu but not the other two and then submits. The problem is when the user doesn't select anything from the first menu.

The next page reads the form value as "" instead of "None" but only for the first menu. The other three menus work fine. I know this isn't really php related, but this is usually such a helpful forum that I thought I'd post here before I start to search for some helpful html forum. Answers would be greatly appreciated, but so would corrections for my terminology (which I think I am confused about) or a good link to a place where I should be asking this question.

View Replies !
Dynamically Populated List Menu
I have a DB with a field called county in a table called info. I want to populate the list menu below with the counties in the field county.

Would there be a way to get around the fact that there will be many entries with the same county and we want only 1 instance in the list menu? Code:

View Replies !
Search With A Menu List Criteria
Now I try this, past all data bye get , and use the temp var with the query , but I don't have a good results... Code:

View Replies !
Change List View To Dropdown Menu
Im working on a script that has to be change so a user can choose from a dropdown menu instead of a list that now is displayed.
Here is the part that is insert on the index page.

View Replies !
Creating Simple Unordered List Menu From XML?
Does anyone have any examples or links to examples of generating a
simple unordered list menu with multiple levels from an XML file? We
are redesigning the navigation on our website and I was hoping to make
this as flexible as possible.


View Replies !
Long Strings In List/menu Boxes
Is there a way to get a list/menu box to resize as the page is resized and
for any long string that is an item in the list to be spread over two or
more lines in the same way as text in a table does.

View Replies !
Flat File List Style Menu
I'm trying to build a Menu Building out of flatfiling with a section to add new areas to it.  The idea behind it is to have a header for each section (as the top order list item) then each one below is a link of that category.

I already figured I'm buillding it with limits (20 items Max per heading) and that to do it I will simply have each Heading/links in it be a new row in the document.  example row Tips tips.php Tips on Php, file tips File Tips tips/files.php, etc etc

With the first item of each row being the Heading and each other being the ones under it My question is What delimiters should I use to seperate in the row (I need to separate each item by 1 delimiter and then in each row separate the href, alt, name)

Secondly for rewrtiign it should I simply write it so each time it rewrites the whole file or should  I try and do string replacing and do modify sorta deal.

View Replies !
Form Validation :: List / Menu In Dreamweaver
Does anyone know anyway to put in additional php coding to validate list/menu in forms? I am currently using Dreamweaver, so I am using their Validation check in their Tags/Behaviour sections. I read in alot of places that this default function does not allow a validation check for list/menu. But I am wondering if anyone know of anyway to put in some additional coding so that it will allow it to validate the list/menu as well?

View Replies !
Pull Down Menu Generating A List Off Another File
Is there a way I can make a pull down menu generating a list off another file of all the destination case coming from the file locations.php?

locations.php

switch ($destination){
case "Las Vegas":
echo "Bring an extra $500";
break;
case "Amsterdam":
echo "Bring an open mind";
break;
case "Egypt":
echo "Bring 15 bottles of SPF 50 Sunscreen";
break;
case "Tokyo":
echo "Bring lots of money";...........

View Replies !
Stuck On Dropdown Menu List, Could Use Some Guidence
I have a form with some drop down list/menus. I do a check for ommissions and if found display a message to re-try. What I need is a way to show which options where chosen when the user submitted the form the first time.

If someone could show me how to do the first one, I'm sure it's the same process for the second one. Here's the code:

View Replies !
Script That Is A Bit Like A Jump Menu But Without The Pull Down List.
I am looking for a script that is a bit like a jump menu but without the pull down list. I want users to be able to enter a post code (4 digits) and then be redirected to a web page based on that post code as each web page is different per code.

the jump menu provided in dreamweaver is almost there but as there are thousands of codes it is impractical to have them drop down.

View Replies !
Print Array In List/menu Form Object
how i print a full column array into a list/menu form object, so that the text links to their respective page.....it is basically for a list of interviews so you click on the band name and then goto the interview page.

View Replies !
How I Can Make A List That Acts Like A Html Jump Menu?
how I can make a list that acts like a html jump menu (for a regular list I have to use a "Go" button in order to achieve the desired behaviour and jump menus I cannot use because they work only with links to other pages).

For example,I want such a list filled with questions from my db and when I select one I want to see its possible answers; the page stays the same, only its data differs based on the selection. Or you can have a look at such a jump menu on this website, the one with options for geting to various sections of the forum.

View Replies !
Force PHP CLI To Stay In RAM?
I have a couple of command-line PHP scripts that are often called, and
I was wondering if it were possible to have the PHP interpreter remain
in RAM instead of being removed after the scipts end?

View Replies !
How Can I Stay Logged In?
I've made a CPanel on my personal website so I can log in and edit my site from there. But now I've made it as simple as I stay logged in for 1 hour.. after that I get logged out automaticly..

so what I wonder is what can I do to stay logged in untill I either close the whole site or I'm idle for moer than 5 minutes?

View Replies !
Stay Logged In
At the moment users can login and they stay logged in as long as their browser is open.
Now i want to add a checkbox to the login form. When they check the checkbox they stay logged in for 1 week. I guess i have to do this with a cookie but i don't have an idea how to do this exactly. I could use url rewriting but i'd rather use a cookie.

View Replies !
Allow A User To Schedule A Stay
I am trying to code a program in PHP that would allow a user to schedule a stay at this place, it would save that to a database. If a particular day has 5 people booking it, it is no longer able to be scheduled. I can't get the scheduler page to check how many people have booked or my calendar to display a day in red if it is booked.

View Replies !
Sessions Won't Stay Registered
I've used sessions before with good results but can't seem to make this work. I have a form with 2 fields : DIVISIONCD and Type. On the form at the top of the page I have: Code:

// start the session
session_start();
header("Cache-control: private");

On the second page I have again at the top of the page: Code:

View Replies !
Problem With Sessions, They Don't Stay Logged
My users have been complaining about having to log in twice or more for the session to register. Then the session deletes itself. Here is my log in php script, I don't know if it is the script, or somthing else. Code:

View Replies !
Forcing A Web Browser To Stay Open
I recently developed stock check system which involves an admin panel that refreshes every thirty seconds to check for new additions to a database. If there is a new addition then a buzzer will sound alerting individuals that action should be taken. This is where the problem lies however, the computer that runs the webpage that refreshes every thirty seconds is a community computer.

People keep closing the page by accident thus rendering the system useless since the buzzer will not sound. Is their any way to check and see if Mozilla or internet explorer are open, and on a certain page? Is their any sort of toolbar system that could easily be used to run the page minimized. How hard would it be to make a .exe file to check the database?

View Replies !
"Always Stay Logged Into Website
I have a web app. that uses session based security. I validate a user's name/password via a web form lookup to a database table, and use session_register() to register session variables for the users. What is the best way for me to give the user to "always stay logged in" to the web app. cookies?

View Replies !
[PEAR:QuickForm] Dynamically Change A Dropdown Menu According To Another Menu?
I've been using QuickForm for a few months now and I am now given a
new challenge:

I've got a search form with a dozen of dropdown menus, the first
dropdown menu being "Brand". If you select either Brand A, B, C, D...
Z, the second dropdown menu "Model" must be dynamically changed to
model AA, AB, AC, AD..., according to the models manufactured by the
brand selected in the first box.

I've seen that done on quite a few sites, but never found if QuickForm
had a quick & clean way of doing that.

View Replies !
Sessions Stay Registered With Multi-logins
I log in with one username, and it says Welcome User1. I click back, and log in with a different user and it says Welcome User1. Now when I click log out with either username, it destroys the session. How do I get it so this doesnt happed. I mean so it will display the correct name and the correct info for each log in name.. PHP Code:

View Replies !
User Input Validation & Filled Value Should Stay
I am intending to make a form on a page, on pushing submit the forms gets posted  onto itself so that it checks for empty fields and prompts user to get all fields filled, BUT the filled value should stay, I did this easily on ASP, but could not figure out in PHP. Code:

View Replies !
How Can I Modify This So Spiders That Come To This Url Stay At My Site And Crawl It Instead Of Following To ?.com ?
I'm getting traffic to an "site/url" that I need redirect to another site, I have been using this code for that:

<?php
header("Location: http://www.???.com");
exit;
?>

How can I modify this so spiders that come to this url stay at my site and crawl it instead of following to ?.com ?

View Replies !
Does POST Array Data Stay Until Unset?
If I set up a series of pages with <form action> that points to the next step in the application process, will I be able to refer back to $_POST[] data directly once it comes time to process the input (provided, of course that I don't use the same form element name throughout)?

In otherwords, if <input name='fname'> appears on the page representing the first step, can I later refer to $_POST['name'] after they click through several pages of forms?

I suppose I could set $_SESSION variables each step, but that seems tedioius for what I want to accomplish....

View Replies !
Session Problem: Some Users Can't Stay Logged In
I have a problem with one of my sites, where certain users don't seem to be able to stay logged in. They log in, then when they go to a different secure page they're told to log in again.

Ordinarily I'd think this was a cookie problem, but on my login screen I run a cookie check script that sets, reloads the page, and reads a cookie to ensure the user has cookies enabled (if they don't they get an alert).

I'm pretty sure it's happening to users with messed up operating systems. I only hear about this kind of thing every few months (though for all I know it's happening more often). I'm not concerned it's the code - I've been over it many times and am convinced I'm handling it as well as it can be handled. Question is, what should I tell my client, who has to deal with these customers with the problematic systems? Maybe "take their order over the phone"... ? Any idea what the problem might be?

View Replies !
Outputting Username To Stay At Top Of Page Throughout User Session.
I have a successful login and session created using PHP and MYSQL and now I would like to have the username appear at the top of the screen after successful login, and possibly, though not necessarily , throughout the entire user session until logout.

Any suggestions as to the easiest, lightest weight and newbie friendly code to use?

View Replies !
Adding Values To An Array - The Value Doesn't Stay After The Page Has Refreshed
i have an array that gets filled by users hitting a FAVORITE button on 'product' pages. I can get one value, but the value doesn't stay after the page has refreshed... so i think I need to use Sessions but I have tried before and have always been unsuccessful... here is the code that displays the favorite product. PHP Code:

View Replies !
Collapsing Menu - Code A Menu For A Webpage
I am trying to code a menu for a webpage, the menu is broken up to groups i.e:

Home
Group1
Â*menuitem1
Â*menuitem2
Â*menuitem3
Group2
Â*Â*menuitem1
Â*Â*menuitem2
Â*menuitem3
And so on.

What I want to achieve is that the groups are shown in a collapsed state depending on the page which is currently being displayed i.e so it starts out like this Code:

View Replies !
Child Menu Name Changes When Parent Menu Changes
THIS IS FOR A SEARCH RECORDS IN A DATABASE TO MATCH SELECTED CRITERIA OF A DYNAMIC OPTIONS LIST

I have a set-up whereby the <select name=" "> of the List determines which field of the datbase is searched. I've create a dynamic drop down menu whereby the Parent menu changes the values of the child menu - that works fine. Code:

View Replies !
Make That Timer Give The User A Window To Extend The Timer To Stay Signed On.
I have a timer and it times out is there anyway that i can make that timer give the user a window to extend the timer to stay signed on. because everytime it times out the user is no longer signed in on the system so some of the features I am afraid stop working. Code:

View Replies !
Form Question - Stay Within The Main Mail Form And Set The Focus On The Empty Field
I created a mailform using a page with the form fields (main mail form) and a php page with some php-code.

<form method="post" action = "result.php">

I added some validation to my form for the required fields and email address. When a required field is empty the results.php shows a message and the user has the possibility to go back to the mailform (link back). It's also used when sending succeeds. But when an user goes back, the form is empty (alread filled fields are empty again).

Now i'am looking for ((a)nother) possibility to solve this. For example stay within the main mail form and set the focus on the empty field (and/or change text color to red) I prefer not to use some javscript, because javascript could have been disabled .

View Replies !
Make Selected Option Stay Selected In A Combo After Submit
I have 3 comboboxes, one for the day, other for the month and another one for the year. Every time i select a value for the three of them and press the "Submit" button, they reset to the default option. Anyway this can be solved?

View Replies !
List Contents Of A Folder, Make List Of Links
Does anyone know how I can write a script that:

- reads in all the files in a particular directory
- displays the file names in a html list and makes a link of them:
<ul>
<li><a href="filelocation1">filename 1</li>
<li><a href="filelocation2">filename 1</li>
<li><a href="filelocation3">filename 1</li>
</ul>

etc.?

So basically it creates a list of links with the contents in that directory,
so you can download them from there.

View Replies !

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