Ask a Question related to PHP Development, Design and Development.
-
Jay Blanchard #1
RE: [PHP] Passing Values between Pages : $_SESSION / $_GET
[snip]
My question here is " How do I get the name of the company that was
passed to this script as a $_GET Parameter. I cannot use the $company
because it is out of scope.
[/snip]
How about $_GET['company'] ? Or am I missing something?
Have a pleasant day.
Jay Blanchard Guest
-
#39223 [NEW]: $_Session and $_Get get confused
From: dgk at visskiss dot org Operating system: Fedora PHP version: 5.1.6 PHP Bug Type: Session related Bug description: ... -
#39011 [NEW]: foreach($_GET as $key => &$value) causes later bugs passing $_GET as a paramete
From: php_bug dot email at email dot digiways dot com Operating system: Windows XP PHP version: 5.1.6 PHP Bug Type: Arrays... -
register_globals, effects on $_GET and $_SESSION
I read php manual many times but I can't figure out register_globals works. I m using Php 4.3.2 and register_globals on. It seems to have different... -
Passing Values between Pages : $_SESSION / $_GET
Hello All, I am using php and mysql in my application which allows users to search/query a database. The database is cast and has about 32 rows... -
Passing Values Between Web Forms Pages
I am porting an old client/server application to asp.net. I used to retrieve data into local tables (Paradox table-files on the client's disk) and... -
Pushpinder Singh Garcha #2
Re: [PHP] Passing Values between Pages : $_SESSION / $_GET
Thank you Jay for responding.
Let me clarify again. The $_GET Parameter was used to to transfer the
name from the results page (with the tables etc) to a
full-profile_1.php page. On the full_profile_1.php page the user is
displayed a form with all the details about the company. On the same
page there is a form where changes can be made to values of the fields.
I am trying to pass the company name in this form as a POST Parameter.
However the Update part of the full_profile.php page is not able to get
this value.
The main point to remember is that full_profile_1.php does 2 things :
1.) Display all the fields of the company as a form which is editable
2.) Now if the user were to make changes in the values that were
returned in the form above , the changes should be updated in the
record. Now my problem is trying to transfer the name of the
company from the 'form' to the update query.
The way the logic on the full_profile_1.php is designed is as
follows:
if ($submit)
{
// This is after the user has been displayed all the fields of
the record and he has made some changes and wanst to Update them
// The Problem is how do I get the same name of the company in
this loop. I have tried to pass the name as another $_POST Variable
from the Form in the else part below, but when I try to access
it over here. nothing comes.
$temp1 = $_POST['temp'];\0\0 // RETURNS EMPTY
:(
}
else{
// here we get the name of the company as a $_GET Parameter from the
previous page
// display all the records of the selected company as a editable Form
<form name="form1" method="POST"
action="full_profile_1.php?temp=$row['company']">\0\0
}
Thanks again, and have a great weekend !
--Pushpinder
On Friday, August 8, 2003, at 04:20 PM, Jay Blanchard wrote:
> [snip]
> My question here is " How do I get the name of the company that was
> passed to this script as a $_GET Parameter. I cannot use the $company
> because it is out of scope.
> [/snip]
>
> How about $_GET['company'] ? Or am I missing something?
>
> Have a pleasant day.
>Pushpinder Singh Garcha Guest
-
Jay Blanchard #3
RE: [PHP] Passing Values between Pages : $_SESSION / $_GET
[snip]
Let me clarify again. The $_GET Parameter was used to to transfer the
name from the results page (with the tables etc) to a
full-profile_1.php page. On the full_profile_1.php page the user is
displayed a form with all the details about the company. On the same
page there is a form where changes can be made to values of the fields.
I am trying to pass the company name in this form as a POST Parameter.
However the Update part of the full_profile.php page is not able to get
this value.
[/snip]
Clearer now.
Place the value in a hidden form field that can be passed along with the
POST
Jay Blanchard Guest
-
Pushpinder Singh Garcha #4
Re: [PHP] Passing Values between Pages : $_SESSION / $_GET
Hello Jay ,
I am attaching snippet of the Form Code that displays the results of
the first query
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<? echo "Hello ::: ".$company."<br>"; ?>
<body bgcolor="aaaaaa" leftmargin="14" topmargin="10">
<form name="form1" method="POST"
action="full_profile_1.php?temp=$company">
<table width="780" border="1" align="center" cellpadding="2"
cellspacing="2">
<tr>
<td width="778" height="1007"> <table width="775" height="1151"
cellpadding="1" cellspacing="2" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#3300CC">
<td height="29" colspan="2"> <div align="center"><font
color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica,
sans-serif"><strong>Complete
Candidate Profile<br>
<br>
</strong></font>
<table width="770" height="27">
<tr>
<td width="385"><font color="#FFFFFF" size="1"
face="Verdana, Arial, Helvetica, sans-serif"><? echo
$_SESSION['validuser']; ?></font></td>
<td width="385"><div align="right"><font
color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica,
sans-serif"><strong><a
href="logout.php">Logout</a></strong></font></div></td>
</tr>
</table>
<font color="#FFFFFF" size="2" face="Verdana, Arial,
Helvetica, sans-serif"><strong><br>
</strong></font></div></td>
</tr>
<tr>
<td width="149" height="28" bgcolor="99ccff"><strong><font
color="#666666" size="1" face="Verdana, Arial, Helvetica,
sans-serif">Company
Name</font></strong></td>
<td width="614" bgcolor="#E7E7E7"><font size="2"
color="#552233" face="Verdana, Arial, Helvetica, sans-serif"><strong><?
echo "$company"; ?></strong>
<input name="company" type="hidden" id="company3"
size="40" value= <? echo "$company"; ?> >
</font></td>
</tr>
<tr> \0\0
// END OF SNIPPET
However when I try to access it in the if($submit) part as
$_POST['temp'] I get nothing !!!
Thanks in advance,
--Pushpinder
On Friday, August 8, 2003, at 04:57 PM, Jay Blanchard wrote:
> [snip]
> Let me clarify again. The $_GET Parameter was used to to transfer the
> name from the results page (with the tables etc) to a
> full-profile_1.php page. On the full_profile_1.php page the user is
> displayed a form with all the details about the company. On the same
> page there is a form where changes can be made to values of the fields.
> I am trying to pass the company name in this form as a POST Parameter.
> However the Update part of the full_profile.php page is not able to get
> this value.
> [/snip]
>
> Clearer now.
>
> Place the value in a hidden form field that can be passed along with
> the
> POST
>Pushpinder Singh Garcha Guest



Reply With Quote

