473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dropdown Menu Passing Last Row as Session Variable

SHOverine
Recently my web host decided to "upgrade". This change rendered many of my pages useless and I am scrambling to fix the issues, so you may see several posts from me in the coming days.

My first issue is that all of my dropdown menus are passing the last row to the next page as the session variable. The pages that I am talking about can be found at:

Weekly13_Test

The code that follows was operational until the change. Here is my code:
[PHP]
<? php

session_start();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>The Weekly 13: Test</title>
</head>
<body;">
<div class="body">

<?php // Grabs header for site
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://theweekly13.com/php/header.php");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec ($curl);
curl_close ($curl);
print $result;
?>

<form method="post" name="picks1.php" action="test.php">
<table
style="width: 35%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="0" cellspacing="10">
<tbody>
<tr>
<td style="width: 83px;" colspan="1"
rowspan="3">
<img style="width: 80px; height: 83px;" alt=""
src="http://theweekly13.com/images/core/pabstheader.jpg"></td>
<td style="text-align: right; width: 25%; font-weight: bold;">
<p1>Season:</p1>
</td>
<td align="undefined" valign="center"><p1>
<?php //Sets Year to current season
$Year = '2007';
echo $Year;
$_SESSION['Year'] = $Year;
?>
</p1>
</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold;"
valign="undefined">
<p1>League:</p1>
</td>
<td>
<?php //Displays League Dropdown Menu, stores league session variable
$queryA = mysql_query("SELECT League, LeagueNumber
FROM NCF_leagues ORDER BY `NCF_leagues`.`LeagueNumber` ASC");
echo "<form action=something.php method=POST>
<select name=League>";
while ($r = mysql_fetch_array($queryA))
{ $League = $r["League"];
$LeagueNumber = $r["LeagueNumber"];
echo "<option value='$LeagueNumber'>$League</option>";
}
echo "</select>";
$_SESSION['League'] = $League;
?>
<br>
</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold;">
<p1>Week:</p1>
</td>
<td>
<?php // Displays Week Dropdown Menu, stores Week session variable
$queryB = mysql_query("SELECT WeekName, WeekID FROM NCF_weeks
ORDER BY `NCF_weeks`.`WeekID` ASC");
echo "<form action=something.php method=POST>
<select name=Week>";
while ($r = mysql_fetch_array($queryB))
{ $Week = $r["WeekName"];
$WeekID = $r["WeekID"];
echo "<option value='$WeekID'>$Week</option>";
}
echo "</select>";
$_SESSION['Week'] = $Week;

?>
</td>
</tr>
<tr>
<td colspan="3" rowspan="1" align="undefined"
valign="undefined">
<hr noshade="noshade">
<div style="text-align: right;"><input
value="Reset Form" type="reset"> <input
name="submitok" value=" OK " type="submit"> </div>
</td>
</tr>
</tbody>
</table>
</form>
</div>

<!-- Current Session Variables:
$_SESSION['Year']
$_SESSION['League']
$_SESSION['Week']
-->

</body>
</html>

[/PHP]

I do not know if the problem exists within my code or within the php.ini that my host now defaults too.

Thanks for any help!
Dec 21 '07 #1
1 2838
I see no one has responded. Perhaps I should re-write my question.

I got most variables to pass from one page to the next, however one continues to fail.

[php]
<?php session_save_path("/xxxxxx/");
session_start(); ?>

--SOME HTML Code--

<?php //Sets Season to current season

$Season = '2007';
echo $Season;
$_SESSION['Season'] = $Season;

?>
[/php]

If anyone has suggestions on why this variable may not be passing, I'd greatly appreciate any help.

I have several variables that are selected by the user from dropdown menus that pass to the next page. Here is the link again: Weekly13 - Test
Dec 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Paul | last post by:
I want to use sessions to cover myself in case the user switches off cookies so I am passing the session ID manually through a hidden input field. This is what I have so far. index.php page...
1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
6
by: Rob Meade | last post by:
Hi all, At work we have 2 servers in a cluster for our web apps. One problem we have experienced (along with many others!) - is that if a user is logged into one of the applications on server...
0
by: Omar K | last post by:
Hi, I am quite new to frontpage and SQL but I have a Stock Control access database / frontpage to set up. My last problem deals with the automatic updating of the total quantity of stock with parts...
2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
4
by: opt_inf_env | last post by:
Hello, I know three ways to pass variables form one page to another. The first one is to declare and set session variable. In this case if one goes to another page (by clicking on hyperlink or...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
4
by: spx27 | last post by:
Does anyone know the best way to handle passing a dynamic menu generated from a login from one asp.net page to another. Would it be better to recreate the menu on each page? Save the menu as a...
4
torquehero
by: torquehero | last post by:
Hi all :) I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.