Hi,
Could someone tell me from the following code how can I pass the following
id's to another page
id_interest
id_subject
id_level
What I want to do is pass these values to another page then convert
them to sessions. Isit possible to convert them to sessions on this page.
I'm quite new to this stuff so a basic explanation of transferring dropdown
variables would be great.
Many tks
Gaz
---------------------------- Code for step one ---------------------------
<?php
// Include the configuration file
require_once ('includes/config.inc');
// Set the page title and include the header
$page_title = 'findagrind home page';
// Include the header file
include_once ('includes/header.htm');
require_once('../Connections/findagrind.php');
mysql_select_db($database_findagrind, $findagrind);
$query_Recordset1 = "SELECT interests.id_interest,interest_name,
subjects.id_subject,subject_name,levels.id_level,level_name
FROM interests,levels,subjects
WHERE interests.id_interest = levels.id_interest
AND interests.id_interest = subjects.id_interest
ORDER BY interest_name,subject_name,level_name ";
$Recordset1 = mysql_query($query_Recordset1, $findagrind) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!-- Start of Content Div -->
<div id = "content">
<h2>Step One: Grind Information</h2>
<?php
// Validate the log-in details
if (isset($_POST['submit']))
// Check if the form has been submitted
{
ob_end_clean();
header("Location: . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/step2.php");
exit();
// Close the database connection
mysql_close();
// End of check if form has been submitted
}
?>
<form name = "signup" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="interest" id="interest" onChange="TCN_reload(this)">
<option selected>interest</option>
</select>
<select name="subject" id="subject" onChange="TCN_reload(this)">
<option selected>subject</option>
</select>
<select name="level" id="level" onChange="TCN_reload(this)">
<option selected>level</option>
</select>
<script language="JavaScript">
the javascript code is here
</script>
<table align="center">
<td colspan="2" class="labelcell"><label for = "confirm_password"></label></td>
<td colspan="2" align="center"><input type="submit" name="submit" value="Log-In"/></td>
</table>
</form>
</div>
<!-- End of Content Div -->
<?php
// Include the footer
include_once('includes/footer.htm');
mysql_free_result($Recordset1);
?>
Could someone tell me from the following code how can I pass the following
id's to another page
id_interest
id_subject
id_level
What I want to do is pass these values to another page then convert
them to sessions. Isit possible to convert them to sessions on this page.
I'm quite new to this stuff so a basic explanation of transferring dropdown
variables would be great.
Many tks
Gaz
---------------------------- Code for step one ---------------------------
<?php
// Include the configuration file
require_once ('includes/config.inc');
// Set the page title and include the header
$page_title = 'findagrind home page';
// Include the header file
include_once ('includes/header.htm');
require_once('../Connections/findagrind.php');
mysql_select_db($database_findagrind, $findagrind);
$query_Recordset1 = "SELECT interests.id_interest,interest_name,
subjects.id_subject,subject_name,levels.id_level,level_name
FROM interests,levels,subjects
WHERE interests.id_interest = levels.id_interest
AND interests.id_interest = subjects.id_interest
ORDER BY interest_name,subject_name,level_name ";
$Recordset1 = mysql_query($query_Recordset1, $findagrind) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!-- Start of Content Div -->
<div id = "content">
<h2>Step One: Grind Information</h2>
<?php
// Validate the log-in details
if (isset($_POST['submit']))
// Check if the form has been submitted
{
ob_end_clean();
header("Location: . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/step2.php");
exit();
// Close the database connection
mysql_close();
// End of check if form has been submitted
}
?>
<form name = "signup" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="interest" id="interest" onChange="TCN_reload(this)">
<option selected>interest</option>
</select>
<select name="subject" id="subject" onChange="TCN_reload(this)">
<option selected>subject</option>
</select>
<select name="level" id="level" onChange="TCN_reload(this)">
<option selected>level</option>
</select>
<script language="JavaScript">
the javascript code is here
</script>
<table align="center">
<td colspan="2" class="labelcell"><label for = "confirm_password"></label></td>
<td colspan="2" align="center"><input type="submit" name="submit" value="Log-In"/></td>
</table>
</form>
</div>
<!-- End of Content Div -->
<?php
// Include the footer
include_once('includes/footer.htm');
mysql_free_result($Recordset1);
?>