Files are attached..

Craig


"Craig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You should have session_start(); on every page that you want to hold the
> session.
>
> The way I would do what you are trying to achieve is go the $_SUPERGLOBALS
> way..
>
> on the submit_information.php page:
>
> <?php
>     session_start();
>     $_SESSION['image'] = $_POST['image'];
>
>     foreach($_SESSION['image'] as $foo){
>         echo $foo . "<br>\n";
>     }
> ?>
>
> Also, another good way of debugging etc is to use the print_r() function
> (http://www.php.net/print_r)
>
> If you do :
>
> <pre><?php print_r($_SESSION);?></pre>
>
> This produces a nice formatted look at the the session arrays/structures -
> same goes for all arrays.
>
> Hope that helps,
>
> Craig
>
>
> "Laurence" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > hello everyone,
> >
> > I'm trying to get some images value from a checkbox putting them in a
> session to preserve the data.  The array works perfectly without the
> session_start() and session_register.
> >
> > can anyone help?
> >
> > html script
> >
> > <html>
> > <head>
> > <title></title>
> > </head>
> >
> > <body>
> > <form action="submit_information.php" method="post">
> >  <input type="checkbox" name=Image[] value="Image_One">
> >  <img src=".gif" name="Image_One"><br>
> >  <input type="checkbox" name=Image[] value="Image_Two">
> >  <img src=".gif" name="Image_Two"><br>
> >  <input type="checkbox" name=Image[] value="Image_Three">
> >  <img src=".gif" name="Image_Two"><br>
> >  <input type="checkbox" name=Image[] value="Image_four">
> >  <img src=".gif" name="Image_One"><br>
> >  <input type="checkbox" name=Image[] value="Image_five">
> >  <img src=".gif" name="Image_Two"><br>
> >  <input type="checkbox" name=Image[] value="Image_six">
> >  <img src=".gif" name="Image_Two"><br>
> >  <input type="submit" value="submit">
> > </form>
> > </body>
> > </html>
> >
> > php script: submit_information.php
> >
> > <?php
> > session_start();
> > session_register("Image");
> >
> > $count = count($Image);
> > for ($i=0; $i<$count; $i++)
> > {
> >   echo $Image[$i];
> > }
> >
> > //I also tried that
> > /*foreach ($Image as $i=> $Img)
> > {
> >  $Img == $Image[$i];
> >  echo $Img;
> > }*/
> >
> > ?>
> >
> >
> >
> >
> > ---------------------------------
> > With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits
> your needs
> >
>
>


begin 666 submit_information.php
M/#]P:' -"@T*"7-E<W-I;VY?<W1A<G0H*3L-"@T*"21?4T534TE/3ELG:6UA
M9V4G72 ]("1?4$]35%LG26UA9V4G73L-"@T*"69O<F5A8V@H)%]315-324].
M6R=I;6%G92==(&%S("1F;V\I>PT*#0H)"65C:&\@)&9O;R N("(\8G(^7&XB
M.PT*#0H)?0T*#0H_/@T*/'!R93X-"@D\/W!H<"!P<FEN=%]R*"1?4T534TE/
.3BD[(#\^#0H\+W!R93X`
`
end

begin 666 index.html
M/&AT;6P^#0H\:&5A9#X-"CQT:71L93X\+W1I=&QE/@T*/"]H96%D/@T*#0H\
M8F]D>3X-"@D\9F]R;2!A8W1I;VX](G-U8FUI=%]I;F9O<FUA=&EO;BYP:' B
M(&UE=&AO9#TB<&]S="(^#0H)"2!);6%G95]/;F4\:6YP=70@='EP93TB8VAE
M8VMB;W@B(&YA;64]26UA9V5;72!V86QU93TB26UA9V5?3VYE(CX\8G(^#0H)
M"2!);6%G95]4=V\\:6YP=70@='EP93TB8VAE8VMB;W@B(&YA;64]26UA9V5;
M72!V86QU93TB26UA9V5?5'=O(CX\8G(^#0H)"2!);6%G95]4:')E93QI;G!U
M="!T>7!E/2)C:&5C:V)O>"(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]4
M:')E92(^/&)R/@T*"0D@26UA9V5?9F]U<CQI;G!U="!T>7!E/2)C:&5C:V)O
M>"(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]F;W5R(CX\8G(^#0H)"2!)
M;6%G95]F:79E/&EN<'5T('1Y<&4](F-H96-K8F]X(B!N86UE/4EM86=E6UT@
M=F%L=64](DEM86=E7V9I=F4B/CQB<CX-"@D)($EM86=E7W-I>#QI;G!U="!T
M>7!E/2)C:&5C:V)O>"(@;F%M93U);6%G95M=('9A;'5E/2));6%G95]S:7@B
M/CQB<CX-"@D)(#QI;G!U="!T>7!E/2)S=6)M:70B('9A;'5E/2)S=6)M:70B
?/@T*"3PO9F]R;3X-"CPO8F]D>3X-"CPO:'1M;#X-"@``
`
end


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to