php-windows Digest 18 Mar 2003 09:51:22 -0000 Issue 1640

Topics (messages 19040 through 19043):

RE:[newbie]session problem
        19040 by: Bobby Rahman
        19041 by: Bob Hall
        19042 by: toby z

multiple selections and checkboxes
        19043 by: toby z

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

Hiya,

Im running php4.2.3 on Win98 and apache 2.0.43.
I am having troubles passing variables from page to page.
I try to use:

session_start();
session_register("test");


when echo $test on a different page it seems to be empty when not called from within the page originally created.

I have session_start() on every page at the start just under the php syntax <? and also register the variables which I want global.

I have edited the php.ini to set the session.save_path = "C:/windows/temp" and also have global variables set on


Any suggestions to what it may be as it doesnt seem to produce any errors.



Thanks


_________________________________________________________________
Express yourself with cool emoticons http://messenger.msn.co.uk


--- End Message ---
--- Begin Message ---
On Tue, Mar 18, 2003 at 01:00:08AM +0000, Bobby Rahman wrote:
> 
> 
> Hiya,
> 
> Im running php4.2.3 on Win98 and apache 2.0.43.
> I am having troubles passing variables from page to page.
> I try to use:
> 
> session_start();
> session_register("test");
> 
> 
> when echo $test on a different page it seems to be empty
> when not called from within the page originally created.
> 
> I have session_start() on every page at the start just under the php syntax 
> <? and also register the variables which I want global.
> 
> I have edited the php.ini to set the session.save_path = "C:/windows/temp" 
> and also have global variables set on

If you mean register_globals, turn it back off. It's not doing you 
any good and it's a security problem.  
> 
> Any suggestions to what it may be as it doesnt seem to produce any errors.

The last time I used the Win version of PHP, I vaguely remember that 
the binary download didn't support sessions. I vaguely remember that 
that has been changed, but it's been so long I'm no longer sure. I 
vaguely remember my name, the date, and my geographical location.

In the past, I've successfully killed sessions by setting 
session.use_cookies to TRUE and turning off cookies in the browser. 
If you're not using cookies, you have to pass the session variables, 
or preferably only the session ID, in the URL. 

A more obscure problem involves forms that call their own files, 
where the file contains code that runs only on the second call. 
In cases where I was setting session variables on the second call, 
I've had to restore the session ID and name to the values set in 
the first call before setting the variable. 

Good luck.
Bob Hall



--- End Message ---
--- Begin Message ---
hi 
try this

initiate session on proc.php
// init sessn
session_start();
                                        
// register session variblez ! ! ! ! 
session_register("SESSN");




chech for session set on sum_page.php

<?php
// sessn chk ! ! ! ! 
session_start();
if(!session_is_registered("SESSN"))
{
// sessn chk failed .... invoke error hndlr ! ! ! ! 
header("Location: /nologn.php");
exit();
}
        


the rest of ur code .....

?>


hope thid helps

good luck

toby ....


 --- Bobby Rahman <[EMAIL PROTECTED]> wrote: > 
> 
> Hiya,
> 
> Im running php4.2.3 on Win98 and apache 2.0.43.
> I am having troubles passing variables from page to page.
> I try to use:
> 
> session_start();
> session_register("test");
> 
> 
> when echo $test on a different page it seems to be empty
> when not called from within the page originally created.
> 
> I have session_start() on every page at the start just under the
> php syntax 
> <? and also register the variables which I want global.
> 
> I have edited the php.ini to set the session.save_path =
> "C:/windows/temp" 
> and also have global variables set on
> 
> 
> Any suggestions to what it may be as it doesnt seem to produce any
> errors.
> 
> 
> Thanks
> 
> _________________________________________________________________
> Express yourself with cool emoticons http://messenger.msn.co.uk
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--- End Message ---
--- Begin Message ---
hi guys

im stuck with a rather silly thing

i fetch db entries into a multi-selection list and check box
when i post these thru a form i get only the FIRST selected value of
the multi-select list and NO value for the check boxes


im all :S:S:S 

heres the code if it makes any sence


cnja.php
---------

<form action=cnja_inzrt.php method=post>
                                
<tr> 
<td style=\"font-family: $font\" height='259' align='center'
valign='top'> 
<table width='100%' border='2
 ' cellspacing='0' cellpadding='0'>
<tr> 
<td style=\"font-family: $font\" height='34' colspan='3'
align='center'><strong><font size='4'>JAARD</font></strong></td>
 </tr>
<tr align='center' valign='top'> 
<td style=\"font-family: $font\" width='41%' height='24'
valign='middle'> <div align='left'>Job 
Title</div></td>
<td style=\"font-family: $font\" width='59%' valign='middle'> <div
align='left'> 
<input name='jb_ttl' type='text'>
</div></td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='21'>Location</td>
<td style=\"font-family: $font\" height='21'> <input name='loc'
type='text'></td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='24'>No of Positions</td>
<td style=\"font-family: $font\" height='24'> <input name='no_poz'
type='text'></td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='22'>Required
Qualifications</td>
<td style=\"font-family: $font\" height='22'>");
//$rq_qlf = 'qlf_rq';   
include"ftch_rq_qlf.php";

echo("                  

</td>
</tr>
 <tr> 
<td style=\"font-family: $font\" height='24'>Expected Salary</td>
<td style=\"font-family: $font\" height='24'> <input name='xp_slry'
type='text'></td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='21'>Must Skills</td>
<td style=\"font-family: $font\" height='21'>");

$rq_skllz = 'mst_skllz';
include"ftch_rq_skllz.php";

echo("                  

</td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='23'>Desired Skills</td>
<td style=\"font-family: $font\" height='23'> ");

$rq_skllz = 'dzrd_skllz';
include"ftch_rq_skllz.php";

echo("                  

</td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='21'>Closing Date</td>
<td style=\"font-family: $font\" height='21'>");


include"ftch_date.php";

echo("                  
                        
</td>
</tr>
<tr> 
<td style=\"font-family: $font\" height='32' colspan='2'><input
type='submit' name='Submit' style=\"font-family: $font\" 
value='Create New Job  '></td>
</tr>
</table>
                
 </td>
</tr>
</form>




-------------------------------------------
ftch_skllz.php
-------------------------------------------

$rq_skllz_ftch_qry = "select skll, skll_id, sq from
tbl_lookup_skllz_qlf where sq='s' or sq='n'";
$rq_skllz_ftch_qry_rzlt_hndlr = mysql_query($rq_skllz_ftch_qry)
                        or die("qry failed ! da tbl must xixt in da db 2 b played vid 
! !
! !");







echo("<select id=skllz_opt name=$rq_skllz width='15'
style=\"font-family: $font\" multiple>
                        
        <optgroup label=select skills> ");


for ($count = 1; $skllz_id =
mysql_fetch_row($rq_skllz_ftch_qry_rzlt_hndlr); ++$count)
        {
                $skll_id = $skllz_id[1];
                $skll_nme = $skllz_id[0];
                $sq = $skllz_id[2];
                
                echo ("<option value=$skll_id>$skll_nme");

                //echo($skll_id.$sq);           
 
        }               
                        
echo("</optgroup>
</select>
                         
                         
");






----------------
ftch_rq_qlf
----------------



$rq_qlfz_ftch_qry = "select skll, skll_id, sq from
tbl_lookup_skllz_qlf where sq='q' or sq='n'";
$rq_qlfz_ftch_qry_rzlt_hndlr = mysql_query($rq_qlfz_ftch_qry)
        or die("qry failed ! da tbl must xixt in da db 2 b played vid ! ! !
!");







/*      echo("<select id=qlf_opt name=rq_qlf width='15'
style=\"font-family: $font\" multiple>
                        
        <optgroup label=select qualifications> ");
        

for ($count = 1; $qlfz_id =
mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme
= mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr)
        {
                $qlf_id = $qlfz_id[1];
                $qlf_nme = $qlfz_id[0];
                $sq = $qlfz_id[2];
                
                echo ("<option value=$qlf_id>$qlf_nme");

                //echo($skll_id.$sq);           
         
        }               
                        
echo("</optgroup>
        </select>
");
*/              



for ($count = 1; $qlfz_id =
mysql_fetch_row($rq_qlfz_ftch_qry_rzlt_hndlr); ++$count)//, $fmly_nme
= mysql_fetch_row ($fmly_nme_ftch_qry_rzlt_hndlr)
        {
                $qlf_id = $qlfz_id[1];
                $qlf_nme = $qlfz_id[0];
                $sq = $qlfz_id[2];
                
                echo ("<input type='checkbox' name=rq_qlf value=$qlf_id>
&nbsp;&nbsp; $qlf_nme
                &nbsp; <br>
                ");

                //echo($skll_id.$sq);           
         
        }





-------------------------------------------------------------------
cnja_inzrt.php
---------------------




include"cnctdb.php";
        
        
        
        
                $jb_ttl = $_POST['jb_ttl'];
                $loc = $_POST['loc'];
                $no_poz = $_POST['no_poz'];
                $qlf = $_POST['$rq_qlf'];
                $rq_skllz = $_POST['$rq_skllz'];
                $mst_skllz = $_POST['mst_skllz'];
                $dzrd_skllz = $_POST['dzrd_skllz'];
                $k_dt = $_POST['kdt'];
                $xp_slry = $_POST['xp_slry'];
                



echo($jb_ttl.$loc.$no_poz."<br>qlf&nbsp;".$qlf."<br>mskllz&nbsp;".$mst_skllz."<br>dzrdskllz&nbsp;".$dzrd_skllz
.$k_dt .$xp_slry);
                        
        


--------------------------------------------------------

now the cnja_inzrt page displays all values but $qlf

i tried ftch_rq_qlf with the multi selection too but cnja_inzrt didnt
display ANYTHING

n the values from ftch_rq_skllz to be displayed on cnja_inzrt.php
show only the first selected value


guyz
im lost at sea
will someone plz help


thnx a mill
stuck as usual 

toby .... :(


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--- End Message ---

Reply via email to