473,396 Members | 1,734 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,396 software developers and data experts.

Drop down menu in a PHP submit form

Hi there,
I am looking for any help with a form I am trying to make, one of the
feilds I want it to be a drop down menu, so this part of the form has set
values and nothing else.

I have tried a few times too make this work, but I can never make it work, I
can`t even seem to find help ojnline for this issue.

If anyone here can geve me some code or point me in the way of a good
tutorial I would be thankful for the help

Bandit.
Jul 17 '05 #1
5 22050
On Thu, 29 Jul 2004 07:44:44 -0300, Bandit wrote:
I am looking for any help with a form I am trying to make,

[ snip irrelevance ]
HTML groups are down the hall ---------------->

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #2

"Bandit" <we*******@bar-guide.ca> wrote in message
news:By********************@nnrp1.uunet.ca...
Hi there,
I am looking for any help with a form I am trying to make, one of the
feilds I want it to be a drop down menu, so this part of the form has set
values and nothing else.

I have tried a few times too make this work, but I can never make it work, I can`t even seem to find help ojnline for this issue.

If anyone here can geve me some code or point me in the way of a good
tutorial I would be thankful for the help

Bandit.


The Form

<form method="post" action="form.php">
<select name="selectitem">
<option value="option 1">Option 1</option>
<option value="option 2">Option 2</option>
<option value="option 3">Option 3</option>
</select>
<input type="submit" value="send">
</form>

The PHP
<?php
print $_POST['selectitem'];
?>
Jul 17 '05 #3
Thanks - I have tried this and I get the return of field cannot be null...

"oeb -=- bleh bleh bleh" <oe*@cotse.com> wrote in message
news:ce**********@kermit.esat.net...

"Bandit" <we*******@bar-guide.ca> wrote in message
news:By********************@nnrp1.uunet.ca...
Hi there,
I am looking for any help with a form I am trying to make, one of the
feilds I want it to be a drop down menu, so this part of the form has set values and nothing else.

I have tried a few times too make this work, but I can never make it
work, I
can`t even seem to find help ojnline for this issue.

If anyone here can geve me some code or point me in the way of a good
tutorial I would be thankful for the help

Bandit.


The Form

<form method="post" action="form.php">
<select name="selectitem">
<option value="option 1">Option 1</option>
<option value="option 2">Option 2</option>
<option value="option 3">Option 3</option>
</select>
<input type="submit" value="send">
</form>

The PHP
<?php
print $_POST['selectitem'];
?>

Jul 17 '05 #4
On Thu, 29 Jul 2004 09:11:30 -0300, "Bandit" <we*******@bar-guide.ca>
calmly ranted:
Thanks - I have tried this and I get the return of field cannot be null...
Give it a default option of your choice, such as

<option value="option 1" selected>Option 1</option>
^^^^^^^^

"oeb -=- bleh bleh bleh" <oe*@cotse.com> wrote in message
news:ce**********@kermit.esat.net...

The Form

<form method="post" action="form.php">
<select name="selectitem">
<option value="option 1">Option 1</option>
<option value="option 2">Option 2</option>
<option value="option 3">Option 3</option>
</select>
<input type="submit" value="send">
</form>

The PHP
<?php
print $_POST['selectitem'];
?>

-------------------------------------------------
- Clinton never - * Wondrous Website Design
- EXhaled.- * http://www.diversify.com
-------------------------------------------------

Jul 17 '05 #5
I noticed that Message-ID: <ZP********************@nnrp1.uunet.ca> from
Bandit contained the following:
Thanks - I have tried this and I get the return of field cannot be null...


The following works on my machine:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form method="post" action="">
<select name="selectitem">
<option value="option 1">Option 1</option>
<option value="option 2">Option 2</option>
<option value="option 3">Option 3</option>
</select>
<input type="submit" value="send">
</form>
<?php
if(isset($_POST['selectitem'])){
print $_POST['selectitem'];
}
?>
</body>
</html>

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jim Bo | last post by:
Hi, I have a drop down menu that is being populated by a query to the access database ---- Code --- Skill needed <SELECT size="1" NAME="SkillType" VALUE="SkillType"> <OPTION>...
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...
2
by: millertime90 | last post by:
Hi basically my problem is I have 2 drop down menus populated by my database the first populated by a field in the database and the 2nd populated with a relation to the value selected in the first...
2
by: Boujii | last post by:
Greetings, I have been attempting to make a drop down menu of countries. From this menu I wish to create a variable in order to INPUT into mysql database. I have no trouble making the drop down menu,...
1
by: sparksol | last post by:
I have a form with a drop down box. If you select an option in the drop down box (depending which option is selected) one or two textbox(es) and a submit button display. I would like to keep the...
0
by: Slickuser | last post by:
From my PHP page: Grab all data from the database. Go through a loop to generate the HTML. Client side: From the Color drop menu list, if a user change the value. It will grab that value &...
0
by: Slickuser | last post by:
From my PHP page: Grab all data from the database. Go through a loop to generate the HTML. Client side: From the Color drop menu list, if a user change the value. It will grab that value &...
2
by: phpnewbie26 | last post by:
I currently have two drop down menus where the second one is populated from the first one. My second drop down menu should be able to do multiple selection. I have searched online and found out how...
6
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.