473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Problem with drop down menu

elen
4
Hello to everyone!
I have a problem and i wish for help.I have a form and i want to contain the values that a specified user had put.I manage to collect correct the values from the database but i have a problem in the drop down menu.I want to shows first the value that the user had choosen.The value is containing in the variable $rf.
I thougth that if i wrote value="<?=$rh;?>" should work but this is wrong!

Expand|Select|Wrap|Line Numbers
  1.  <td align=center><select name="eid_farm3" value="<?=$rh;?>"> 
  2.        <option value="a">A
  3.        <option value="b">B
  4.         <option value="c">C
  5.  </td></select>
  6.  
  7.  
Oct 10 '08 #1
5 998
Dormilich
8,658 Expert Mod 8TB
of course that's wrong.
1st - use <?php / ?>
2nd - output functions: echo, print

today’s recommended link: PHP.net

regards
Oct 10 '08 #2
Markus
6,050 Expert 4TB
of course that's wrong.
1st - use <?php / ?>
2nd - output functions: echo, print

today’s recommended link: PHP.net

regards
Actually, Dormilich, that would work if she hard short tags enabled.

OP: to display the previously selected option, you have to set it to selected="selected"

Expand|Select|Wrap|Line Numbers
  1. <select name="eid_farm3"> 
  2.        <option value="a">A</option>
  3.        <option value="b" selected="selected">B</option>
  4.         <option value="c">C</option>
  5. </select>
Oct 10 '08 #3
Dormilich
8,658 Expert Mod 8TB
Actually, Dormilich, that would work if she hard short tags enabled.
I know, but I think it's better practice to use the php specific tags.
Oct 10 '08 #4
Atli
5,058 Expert 4TB
I know, but I think it's better practice to use the php specific tags.
As do I. Using the short-tags is just lazy.
But they do work if your server is configured that way. (For now)

Dormilich.
Please try not to post links to the German version of the manual.
It's both a lot slower to load for us that are not in Germany, and once it has loaded, we don't understand it.
Oct 10 '08 #5
Dormilich
8,658 Expert Mod 8TB
Dormilich.
Please try not to post links to the German version of the manual.
It's both a lot slower to load for us that are not in Germany, and once it has loaded, we don't understand it.
D***, lately I seem to forget to substitute the "de" in the copied links a lot. It's not that I intend to lead you to the german version (but that's the first one I get and read).

I hope you can forgive me
Oct 10 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Haines Brown | last post by:
I've implemented the horizontal drop down menu discussed recently in this newsgroup, and it works nicely under Galeon and Mozilla, but not IE 5.0. Here are the problems: Under IE 5.0, the...
0
by: vikram.cvk | last post by:
Hello Experts, Im trying to design a CSS vertical drop down menu which should have the following functionality. Home About Us | -->Overview
6
by: Adrienne | last post by:
http://www.intraproducts.com/beta/infinicall/index.asp has a drop down menu on Investor Relations. The markup and CSS are both valid, and most of the time, the menu drops down correctly. However,...
5
by: Xarky | last post by:
Hi, I followed this link to design my drop-down menu: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_fp2003_ta/html/OfficeFrontPageCreateDropDownMenu.asp The css file being...
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
1
by: StevePBurgess | last post by:
Hi I am using a drop down menu adapted from the one in Stylin with CSS by Charles Wyke Smith. The CSS is below. It works perfectly in Internet Explorer (using the csshover behaviour file) but...
1
by: phpnewb | last post by:
Hi, I know i'm doing it wrong, but I'm using a while loop right now to create several instances of a drop down menu. It gives me undesirable results. Can you tell me the right way to do it. Below are...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
5
by: jerry101 | last post by:
Hi, I've been working on a horizontal drop down menu today, and I can get it to display perfectly in everything bar IE6. Basically instead of them lining up horizontally, they line up...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.