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
https://forums.phpfreaks.com/topic/81410-redirection-to-php-pages/
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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.