Jump to content

Integrating PHP and JavaScript


atholon

Recommended Posts

I've done it lie this:

 

suppose your page is called 'thisPage.php':

<?php
$info = $GET['info'];
if($info=='option1') ;//do something
if($info=='option2') ;//do something
if($info=='option3') ;//do something
?>
<select id='form_select' onchange="document.location.href='thisPage.php?info='+document.getElementById('form_select').value">
<option value='option1'>Option #1</option>
<option value='option2'>Option #2</option>
<option value='option3'>Option #3</option>
</select>

 

Is this what you had in mind?

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.