I had a friend help me with some database work and he even made a basic html display of the functions...
I am now trying to move those functions to let us mess around with displays here at work.
The first drop down will load just fine, but the second and third ones are not loading.
I have the php database files loaded to the MySQL admin part in my MAMP server, but still can't get the code to reference it.
Is this something I can fix in HTML or PHP?
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<title>dynaflex products testing</title>
<SCRIPT language=JavaScript>
function reload(form) //this js function fires when the 1st dropdown box is changed
{
var val=form.Makerid.options[form.Makerid.options.selectedIndex].value; //takes the "value" from the options listed in the form
self.location='dd3.php?id='+val ;//changes the location ofthe page (redirect) but it is taking the value from the above line
}
function reload3(form)//this function fires when u select the 2nd dropdown, it allows u to select from the 3rd box
{
var val=form.Makerid.options[form.Makerid.options.selectedIndex].value; //takes value from the 1st box
var val2=form.theModels.options[form.theModels.options.selectedIndex].value; //takes value from the 2nd box
self.location='dd3.php?id=' + val + '&id3=' + val2 ;//this then redirects taking with it the values from above just like the last function but has 1 more varible
}
function redirect(form)//this form is the last box's action, can only be fired when u select the 3rd box
{
self.location=form.theYears.options[form.theYears.options.selectedIndex].value; //redirects you to the url inside of the table at the url/value field just like the 1st function but differnt
}
</script>
</head>
<body>
<form method=post name=f1 action='../../../Users/Marketing/Desktop/dd3ck.php'><select name='Makerid' onchange="reload(this.form)"><option value=''>Select one</option><option value=1>Peterbilt</option><option value=2>Kenworth</option><option value=3>Western Star</option><option value=4>Freightliner</option></select></form><br><br>
<a href=../../../Users/Marketing/Desktop/dd3.php>Reset and Try again</a>
<br><br>
</body>
</html>
dd3ck.php (PHP Code, as pasted into comment below gibberish's answer):
<!doctype html public "-//w3c//dtd html 3.2//en">
<html>
<head>
<title>Multiple drop down list box from plus2net</title>
</head>
<body>
<?Php
$cat=$_POST['cat'];
$subcat=$_POST['subcat'];
$subcat3=$_POST['subcat3'];
echo " cat=$cat <br> subcat=$subcat <br> subcat3= $subcat3 ";
?>
<br>
<br>
<a href=dd3.php>Reset and Try again</a>
<br>
<br>
<center><a href='plus2net.com'; rel="nofollow">PHP SQL HTML free tutorials and scripts</a></center>
</body>
</html>
</div>