Hello,
I have an issue where by I wish to pass three values from an originating page to a subsequent page. The intention in future is to pass the values from the originating page to execute a php script with variables attached.
Anyway the first page has three drop down boxes which retrieve the correct values from the MySQL database, however when the “Submit” button is pressed the next page does not display the submitted values. Any insight/advice would be welcomed.
– First script
[code]
<?php require "config.php"; // Your Database details ?> <? // variables to change query1, result11, dropdown11 // query1 $query1 = "SELECT LANG, LANG_ID FROM LANG"; // Execute it, or return the error message if there's a problem. $result1 = mysql_query($query1) or die(mysql_error()); // query2 $query2 = "SELECT LANG, LANG_ID FROM LANG"; // Execute it, or return the error message if there's a problem. $result2 = mysql_query($query2) or die(mysql_error()); // query3 $query3 = "SELECT SUBJECT, SUBJECT_ID FROM SUBJECT"; // Execute it, or return the error message if there's a problem. $result3 = mysql_query($query3) or die(mysql_error()); // dropdown1 $dropdown1 = ""; while($row = mysql_fetch_assoc($result1)) { $dropdown1 .= "\r\n{$row['LANG']}"; } $dropdown1 .= "\r\n"; echo "Language 1: "; echo $dropdown1; // dropdown2 //Language 2: $dropdown2 = ""; while($row = mysql_fetch_assoc($result2)) { $dropdown2 .= "\r\n{$row['LANG']}"; } $dropdown2 .= "\r\n"; echo " Language 2: "; echo $dropdown2; // dropdown3 $dropdown3 = ""; while($row = mysql_fetch_assoc($result3)) { $dropdown3 .= "\r\n{$row['SUBJECT']}"; } $dropdown3 .= "\r\n"; echo " Subject: "; echo $dropdown3; $dropdown1 = $_POST["dropdown1"]; $dropdown2 = $_POST["dropdown2"]; $dropdown3 = $_POST["dropdown3"]; echo ""; mysql_close($con); ?> [/code]– Second script. It is named process.php
[code]
<?php echo $dropdown1 echo $dropdown2 echo $dropdown3 ?> [/code]thanks
Steve