473,749 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dropdown Menu Passing Last Row as Session Variable

SHOverine
18 New Member
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($cu rl, CURLOPT_RETURNT RANSFER, 1);

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

<form method="post" name="picks1.ph p" action="test.ph p">
<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="undefine d" 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="undefin ed">
<p1>League:</p1>
</td>
<td>
<?php //Displays League Dropdown Menu, stores league session variable
$queryA = mysql_query("SE LECT League, LeagueNumber
FROM NCF_leagues ORDER BY `NCF_leagues`.` LeagueNumber` ASC");
echo "<form action=somethin g.php method=POST>
<select name=League>";
while ($r = mysql_fetch_arr ay($queryA))
{ $League = $r["League"];
$LeagueNumber = $r["LeagueNumb er"];
echo "<option value='$LeagueN umber'>$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("SE LECT WeekName, WeekID FROM NCF_weeks
ORDER BY `NCF_weeks`.`We ekID` ASC");
echo "<form action=somethin g.php method=POST>
<select name=Week>";
while ($r = mysql_fetch_arr ay($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="undefine d"
valign="undefin ed">
<hr noshade="noshad e">
<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 2856
SHOverine
18 New Member
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_pa th("/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
5942
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 contains: <?php $_SESSION = ""; $_SESSION = "";
1
7785
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: ---------------------------------------------------------------------------- <?php ini_set("session.use_cookies", "off"); ini_set("session.use_trans_sid", "on"); session_start(); $_SESSION = ""; $_SESSION = ""; echo "<form method='POST' action='login.php'>
6
2253
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 a for example and it goes offline or fails their session is lost also - even though the application becomes available on server b. I have heard that it is possible to either exchange the sessions between
0
1715
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 move in or out of the warehouse. The following shows my page layout (i posted this on the frontpage group, but I think their level is too high for my skills, since i use the DRR most of the time) I have form.htm that asks the user for two...
2
6439
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 between "display='none'" and "display=''". However the problem is that - in Internet Explorer 6 the dropdown (<select>...) always hides the menu
4
9201
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 pressing a button) value of a session variable will be automatically seen on the new page. The second way is to set hidden variables in the form and go to new page by execution of this form (press a button or enter), and the last way, which I...
6
3255
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 query-string flag is used to indicate to the page whether it should instantiate a new instance of the object or access an existing instance from the calling page. On the both pages I have a property of the page which is an instance of this custom...
4
2702
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 string into a session variable upon login? Any other way to do this I may be missing? This menu is part of an intranet. The user logs in, checks SQL database for folder permissions, then scans web directories for all folders which match permissions...
4
2346
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 list/menu appears. When the page is opened in the browser (as it appears by default), the dropdown menu positions are correctly displayed. But when I scroll the page and then move the mouse over any menu item of the navbar, the dropdown menu is not...
0
9566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9333
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.