Jump to content

Redirection to PHP pages


mikebyrne

Recommended Posts

I want my optionlist to point to my php pages. How can I code this??

 

<html>
<head>
<title>Ass3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#FFFF00">
<form name="myform" action="Ass3.asp" method="POST">
<div align="center">
  <p> </p>
  <p><font size="+7">Database Maintenance </font></p>
  <p> </p>
  <p> </p>

  <p>
    <select name="mydropdown" size="1">
      <option value="Select">Please Select Option</option>
      <option value="Add">Add a Project</option>
      <option value="Change">Change a Project</option>
      <option value="Delete">Delete a project</option>
      <option value="List">List all project details</option>

    </select>
          </p>
          <input type="submit" value="Go!">
</div>
</form>
</body>
</html>

 

I want Add to bring me to Add.asp, change to Change.asp etc

Link to comment
Share on other sites

use a javascript onchange event in on your select menu.

 

try something like this:

 

<script language="javascript">
function takemethere(value)
{
document.location.href=""+value+".php";
}
</script>

    <select name="mydropdown" size="1" onchange="takemethere(this.value)">
      <option value="Select">Please Select Option</option>
      <option value="Add">Add a Project</option>
      <option value="Change">Change a Project</option>
      <option value="Delete">Delete a project</option>
      <option value="List">List all project details</option>

    </select>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.