473,320 Members | 2,088 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,320 software developers and data experts.

How to Use variable of One form into other form

I have two forms.

I m working at a Grade System.

First form have drop down list of courses which selects coursecode from a table courses. and when pressing submit button. It calls "gradecs.php" Which is called by action="gradecs.php". But in gradecs.php I want to use the variable coursecode which is selected in previous form. Although I used the following
variable to store the value of selected dropdown list.


$subjectcode=$_POST['subjectcod'];

IPlease advise.


Please advise
Nov 2 '07 #1
3 1397
Markus
6,050 Expert 4TB
I really don't understand your question..
Nov 2 '07 #2
As per your question, as u passed the first variable in gradeces.php and u store in the variable $subjectcode = $_POST['subjectcode'];
so do one thing pass this variable to the next form as hidden text
[HTML]
<form name="#" action="#.php" method="post">
<input type="hidden" value = "<?php echo $subjectcode; ?>" name="subject_code">
.....
.
.
.
.
.
</form>
[/HTML]
in the next the form access the value as same by name ok ..try it

I have two forms.

I m working at a Grade System.

First form have drop down list of courses which selects coursecode from a table courses. and when pressing submit button. It calls "gradecs.php" Which is called by action="gradecs.php". But in gradecs.php I want to use the variable coursecode which is selected in previous form. Although I used the following
variable to store the value of selected dropdown list.


$subjectcode=$_POST['subjectcod'];

IPlease advise.


Please advise
Nov 2 '07 #3
Atli
5,058 Expert 4TB
Hi.

For more sensitive data, you should consider using Sessions. They won't require you to send the variable back to the client to be re-submitted.
Nov 2 '07 #4

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

Similar topics

1
by: Newbie | last post by:
OK, this may be impossible since I'm using 3rd party shopping cart ASP software, but I've been able to finagle a lot of other stuff I thought wouldn't work, so here we go: I'm using a form in...
6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
5
by: Jim Banks | last post by:
Greetings I'm opening a pop up window with a html form, (in one document) and I want to pass a variable to the html form called from the hyperlink. Here's the code I'm using to pop up the...
3
by: Larry L | last post by:
This is a novice question, but I'm stumped. I have a variable with a bunch of text assigned to it. Now I want to email the value of the variable. I have a simple form that asks for their name and...
1
by: Larry L | last post by:
I'm pretty novice at javascript, and it took me this long to understand what is happening in my page so far. On my page I do several things, requiring user input, to create a variable that I...
2
by: Skybuck Flying | last post by:
Hi, I think I might have just invented the variable bit cpu :) It works simply like this: Each "data bit" has a "meta data bit". The meta data bit describes if the bit is the ending bit...
8
by: Mike Turco | last post by:
This is a strange one. I have an app that needs to know who is using the program but there's no need for security. When the program opens a form comes up with a listbox. The user double-clicks...
4
by: Mike TI | last post by:
April 22, 2006 Hi all I want to execute a command stored in a variable, eg I may store: Form1.Show() or Form2.Show()
10
by: Mason Barge | last post by:
I have a standard POST form consisting of two types of input: text input and textarea. The form downloads current settings from a mysql database. The user can update the information by modifying...
5
by: Twayne | last post by:
Hi, If ever a newbie wants to know how much he has to learn yet, he only has to look here<g>!! ANYway: PHP 5.2.5; XP Pro SP2+, local Apache Server My actual question is: How do I get a...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.