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

Form Processing

Hi. I am new to PHP and would like some help with my select list. I have looked at many places but unfortanately, tutorials I have looked at are either not what I'm specifically looking for or do not even cover them. I'm looking to have a select list and upon selecting an option, it displays an image under the list.

Expand|Select|Wrap|Line Numbers
  1.     <form name="jump" method="post" action="/routes.php">
  2.         <p align="center">
  3.         <select name="menu">
  4.         <option value="/x.php?=0">Select a Route</option>
  5.         <option value="/x.php?=1">1</option>
  6.         <option value="/x.php?=4">4</option>
  7.         <option value="/x.php?=15">15</option>
  8.         </select>
  9.         <input type="button" onClick="GO">
  10.       </form>
  11.  
Expand|Select|Wrap|Line Numbers
  1. <?
  2.     if (value == 0) {
  3.         echo '<img>/images/allroutes.gif</img>';
  4.         echo '';
  5.     }
  6.     else if (value == 1) {
  7.         echo "<img>/images/route01.gif</img>";
  8.         echo "";
  9.     }
  10.     else if (value == 4) {
  11.         echo '<img>/images/route04.gif</img>';
  12.         echo '';
  13.     }
  14.     else if (value == 15) {
  15.         echo '<img>/images/route15.gif</img>';
  16.         echo '';
  17. ?>
  18.  
Thank you
Mar 4 '07 #1
1 1077
ak1dnar
1,584 Expert 1GB
<form name="jump" method="post" action="routes.php">
<p align="center">
<select name="menu">
<option value="0">Select a Route</option>
<option value="1">1</option>
<option value="4">4</option>
<option value="15">15</option>
</select>
<input type="button" onClick="GO">
</form>


and from the NEXT page use

<img src="Your Image location" />

After 38 posts you know by now that you must display your code within code or php tags!!! Otherwise it will be removed.

moderator
Mar 4 '07 #2

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

Similar topics

1
by: Danny Anderson | last post by:
Hola, PHP folk! I have a php page that contains a self-processing form. The form holds search results. The search terms originally came from the previous page, but the user can repeatedly...
8
by: dmcconkey | last post by:
Hi folks, I have a client with four websites. Each site has a contact form that is identical. They all have "required" fields validated through a JavaScript onSubmit() function. Upon validation,...
1
by: David Bradbury | last post by:
Hi On my form, as soon as the user clicks my submit button a message pops up saying "Form processing" as the form submits. This is fine as long as the user only clicks the submit button once....
8
by: Raed Sawalha | last post by:
I have form with progress bar ,when application begin processing and progress bar moving if I minimized the form and try to restore it ,it is not showing until the processing completed ,how can I...
8
by: Brian Fulford | last post by:
This is my first shot at a Winforms application in dot net. This application is mainly going to run unattended but is using a form to display current activity of the background processing. In VB6,...
12
by: Ger | last post by:
My dialogue form (sometimes partly, sometimes as a whole) remains visible during a fairly long processing job. The dialogue asks the user to enter some data for the job to follow, and after OK,...
15
by: Jack | last post by:
Hi, I have a asp form where one element is a list box which lists four years starting from 2004. This list is drawn from a database table which has YearID and Year as two fields as shown below:...
2
by: AJang | last post by:
My windows form "Form1" has one Button "button1" and one TextBox "textBox1". When I click button1, it do a job for each file in a directory. The job include some platform invoke call. Before...
2
by: rdemyan via AccessMonster.com | last post by:
My application has a lot of complicated SQL statements, calculations, processing that takes time. I've created a custom form to act like a messagebox. It has 10 small rectangles on it that change...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.