I'm building a very simple content management site that tracks "tasks."
The options available are:
1. Add Task
2. Edit Task
3. View Task
4. Print Task
I need to restrict some users to only View and Print and I'm trying to =
find a way to tell the page not to load the menu options (the text) for =
those not having access to the Add and Edit functions.
IOW, they would only see View and Print.
I have three basic users:
1. System Admin
2. Subject Matter Expert (SME)
3. Viewers
Obviously the System Admin and SME will have full access so it's the =
Viewers that are to have access to only View and Print.
I have a users table but haven't set it up for the distinction. What I =
was thinking was creating a field labeled users_group and assign a =
numeric value for each user using the numbering system above.
I have my page load the menu options:
into here...
align=3D"center">
ICAO Tasks — =
WAFS
=20
=20
Menu
<--The menu above =
inserted here.
=20
=20
How can I tell the system not to load the last two lines unless they are =
a System Admin or SME?
I read a chapter on Cookies/Sessions...but it wasn't that helpful for =
this case.
Can I setcookie('user_group', '3') and use that somehow???
Am I in the ballpark with this solution?
Thanks.
Jeff
------=_NextPart_000_0005_01C640EF.5D6FFEA0--
Re: Retricting Access to Menu Items
am 06.03.2006 16:37:58 von jeffreyb
I've done this kind of thing with a number of web apps.
What I usually do is create a user table in MySQL with a user-name,
password and access level, which has an integer value.
When a user logs in successfully, a session is created (see
session_start() in php documentation), the access level is pulled from
the user table and saved as a session variable. Then it is a simple
matter of using bits of code like...
if ($_SESSION['access_level'] > 7){
echo "some stuff";
}
In your example, you will also want to check the user's access level on
each restricted page - it is not enough to hide menu options. Users
could simply type the URL in.
I hope that's clear.
Good luck,
Jeffrey
Jeff Broomall wrote:
> Good morning everyone.
>
> I'm building a very simple content management site that tracks "tasks."
>
> The options available are:
> 1. Add Task
> 2. Edit Task
> 3. View Task
> 4. Print Task
>
> I need to restrict some users to only View and Print and I'm trying to find a way to tell the page not to load the menu options (the text) for those not having access to the Add and Edit functions.
>
> IOW, they would only see View and Print.
>
> I have three basic users:
> 1. System Admin
> 2. Subject Matter Expert (SME)
> 3. Viewers
>
> Obviously the System Admin and SME will have full access so it's the Viewers that are to have access to only View and Print.
>
> I have a users table but haven't set it up for the distinction. What I was thinking was creating a field labeled users_group and assign a numeric value for each user using the numbering system above.
>
> I have my page load the menu options:
>
>
>
>
>
>
> into here...
>
>
>
>
>
>
ICAO Tasks — WAFS
>
>
>
> Menu
> <--The menu above inserted here.
>
>
>
>
>
> How can I tell the system not to load the last two lines unless they are a System Admin or SME?
>
> I read a chapter on Cookies/Sessions...but it wasn't that helpful for this case.
>
> Can I setcookie('user_group', '3') and use that somehow???
>
> Am I in the ballpark with this solution?
>
> Thanks.
>
> Jeff
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Retricting Access to Menu Items
am 07.03.2006 01:07:18 von Bastien Koert
if you pull the user data into a session, then its a simple if them check
if ($_SESSION['user']['user_access']>1) //1 = basic user
{
echo ' ';
echo ' ';
}
bastien
>From: "Jeff Broomall"
>To:
>Subject: [PHP-DB] Retricting Access to Menu Items
>Date: Mon, 6 Mar 2006 07:27:03 -0500
>
>Good morning everyone.
>
>I'm building a very simple content management site that tracks "tasks."
>
>The options available are:
> 1. Add Task
> 2. Edit Task
> 3. View Task
> 4. Print Task
>
>I need to restrict some users to only View and Print and I'm trying to find
>a way to tell the page not to load the menu options (the text) for those
>not having access to the Add and Edit functions.
>
>IOW, they would only see View and Print.
>
>I have three basic users:
> 1. System Admin
> 2. Subject Matter Expert (SME)
> 3. Viewers
>
>Obviously the System Admin and SME will have full access so it's the
>Viewers that are to have access to only View and Print.
>
>I have a users table but haven't set it up for the distinction. What I was
>thinking was creating a field labeled users_group and assign a numeric
>value for each user using the numbering system above.
>
>I have my page load the menu options:
>
>
>
>
>
>
>into here...
>
>
>
>
>align="center">
>
>
ICAO Tasks WAFS
>
>
>
> Menu
> <--The menu above inserted
>here.
>
>
>
>
>
>How can I tell the system not to load the last two lines unless they are a
>System Admin or SME?
>
>I read a chapter on Cookies/Sessions...but it wasn't that helpful for this
>case.
>
>Can I setcookie('user_group', '3') and use that somehow???
>
>Am I in the ballpark with this solution?
>
>Thanks.
>
>Jeff
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Retricting Access to Menu Items
am 07.03.2006 06:32:59 von MIGUEL ANTONIO GUIRAO AGUILAR
Now that you mention it!!
I tried to use sessions but without success, i did:
session_start();
session_register(var);
but after log in as a different user, it keeps taking the data of the previous user. If I close the browser window and reload the page and log in, then it takes de current user
Maybe I'm not killing the previous session! session_unset();
Do I need to propagate the Session ID on every page that use session_start()??
Can I use session_id();?
Best Regards,
Miguel Guirao
----- Mensaje original -----
De: Jeffrey
Fecha: Lunes, Marzo 6, 2006 7:37 ombr
Asunto: Re: [PHP-DB] Retricting Access to Menu Items
> I've done this kind of thing with a number of web apps.
>
> What I usually do is create a user table in MySQL with a user-name,
> password and access level, which has an integer value.
>
> When a user logs in successfully, a session is created (see
> session_start() in php documentation), the access level is pulled
> from
> the user table and saved as a session variable. Then it is a simple
> matter of using bits of code like...
>
> if ($_SESSION['access_level'] > 7){
> echo "some stuff";
> }
>
> In your example, you will also want to check the user's access
> level on
> each restricted page - it is not enough to hide menu options. Users
> could simply type the URL in.
>
> I hope that's clear.
>
> Good luck,
>
> Jeffrey
>
> Jeff Broomall wrote:
> > Good morning everyone.
> >
> > I'm building a very simple content management site that tracks
> "tasks.">
> > The options available are:
> > 1. Add Task
> > 2. Edit Task
> > 3. View Task
> > 4. Print Task
> >
> > I need to restrict some users to only View and Print and I'm
> trying to find a way to tell the page not to load the menu options
> (the text) for those not having access to the Add and Edit functions.
> >
> > IOW, they would only see View and Print.
> >
> > I have three basic users:
> > 1. System Admin
> > 2. Subject Matter Expert (SME)
> > 3. Viewers
> >
> > Obviously the System Admin and SME will have full access so it's
> the Viewers that are to have access to only View and Print.
> >
> > I have a users table but haven't set it up for the distinction.
> What I was thinking was creating a field labeled users_group and
> assign a numeric value for each user using the numbering system above.
> >
> > I have my page load the menu options:
> >
> > Home
> > View Tasks
> > Edit Task
> > Add Task
> >
> > into here...
> >
> >
> >
> >
> align="center">>
> >
ICAO Tasks —
> WAFS
>
> >
> >
> > Menu
> > <--The menu above
> inserted here.
> >
> >
> >
> >
> >
> > How can I tell the system not to load the last two lines unless
> they are a System Admin or SME?
> >
> > I read a chapter on Cookies/Sessions...but it wasn't that helpful
> for this case.
> >
> > Can I setcookie('user_group', '3') and use that somehow???
> >
> > Am I in the ballpark with this solution?
> >
> > Thanks.
> >
> > Jeff
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may b
e used or reproduced in any manner whatsoever.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Retricting Access to Menu Items
am 07.03.2006 13:01:31 von Luis M Morales C
Miguel,
Take this tips:
Before load your html main tags put:
..................................................
Then try get the person array from another php page, using the same
schema for that.
Regards,
Luis Morales
On Mon, 2006-03-06 at 21:32 -0800, MIGUEL ANTONIO GUIRAO AGUILAR wrote:
>
> Now that you mention it!!
>
> I tried to use sessions but without success, i did:
>
> session_start();
> session_register(var);
>
> but after log in as a different user, it keeps taking the data of the previous user. If I close the browser window and reload the page and log in, then it takes de current user
>
> Maybe I'm not killing the previous session! session_unset();
> Do I need to propagate the Session ID on every page that use session_start()??
> Can I use session_id();?
>
> Best Regards,
> Miguel Guirao
>
>
> ----- Mensaje original -----
> De: Jeffrey
> Fecha: Lunes, Marzo 6, 2006 7:37 ombr
> Asunto: Re: [PHP-DB] Retricting Access to Menu Items
>
> > I've done this kind of thing with a number of web apps.
> >
> > What I usually do is create a user table in MySQL with a user-name,
> > password and access level, which has an integer value.
> >
> > When a user logs in successfully, a session is created (see
> > session_start() in php documentation), the access level is pulled
> > from
> > the user table and saved as a session variable. Then it is a simple
> > matter of using bits of code like...
> >
> > if ($_SESSION['access_level'] > 7){
> > echo "some stuff";
> > }
> >
> > In your example, you will also want to check the user's access
> > level on
> > each restricted page - it is not enough to hide menu options. Users
> > could simply type the URL in.
> >
> > I hope that's clear.
> >
> > Good luck,
> >
> > Jeffrey
> >
> > Jeff Broomall wrote:
> > > Good morning everyone.
> > >
> > > I'm building a very simple content management site that tracks
> > "tasks.">
> > > The options available are:
> > > 1. Add Task
> > > 2. Edit Task
> > > 3. View Task
> > > 4. Print Task
> > >
> > > I need to restrict some users to only View and Print and I'm
> > trying to find a way to tell the page not to load the menu options
> > (the text) for those not having access to the Add and Edit functions.
> > >
> > > IOW, they would only see View and Print.
> > >
> > > I have three basic users:
> > > 1. System Admin
> > > 2. Subject Matter Expert (SME)
> > > 3. Viewers
> > >
> > > Obviously the System Admin and SME will have full access so it's
> > the Viewers that are to have access to only View and Print.
> > >
> > > I have a users table but haven't set it up for the distinction.
> > What I was thinking was creating a field labeled users_group and
> > assign a numeric value for each user using the numbering system above.
> > >
> > > I have my page load the menu options:
> > >
> > > Home
> > > View Tasks
> > > Edit Task
> > > Add Task
> > >
> > > into here...
> > >
> > >
> > >
> > >
> > align="center">>
> > >
ICAO Tasks —
> > WAFS
>
> > >
> > >
> > > Menu
> > > <--The menu above
> > inserted here.
> > >
> > >
> > >
> > >
> > >
> > > How can I tell the system not to load the last two lines unless
> > they are a System Admin or SME?
> > >
> > > I read a chapter on Cookies/Sessions...but it wasn't that helpful
> > for this case.
> > >
> > > Can I setcookie('user_group', '3') and use that somehow???
> > >
> > > Am I in the ballpark with this solution?
> > >
> > > Thanks.
> > >
> > > Jeff
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
>
> This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may
be used or reproduced in any manner whatsoever.
>
--
------------------------------------------------------------ ---------------------
Luis Morales
Consultor de Tecnologia
Cel: +(58)416-4242091
------------------------------------------------------------ ---------------------
"Empieza por hacer lo necesario, luego lo que es posible... y de pronto
estarás haciendo lo imposible"
------------------------------------------------------------ ---------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Retricting Access to Menu Items
am 08.03.2006 00:39:31 von Bastien Koert
session_register is old method...$_SESSION['var'] is the better way. You
will still need session_start(); at the top of the page
bastien
>From: MIGUEL ANTONIO GUIRAO AGUILAR
>To: Jeffrey
>CC: php-db@lists.php.net
>Subject: Re: [PHP-DB] Retricting Access to Menu Items
>Date: Mon, 06 Mar 2006 21:32:59 -0800
>
>
>
>Now that you mention it!!
>
>I tried to use sessions but without success, i did:
>
>session_start();
>session_register(var);
>
>but after log in as a different user, it keeps taking the data of the
>previous user. If I close the browser window and reload the page and log
>in, then it takes de current user
>
>Maybe I'm not killing the previous session! session_unset();
>Do I need to propagate the Session ID on every page that use
>session_start()??
>Can I use session_id();?
>
>Best Regards,
>Miguel Guirao
>
>
>----- Mensaje original -----
>De: Jeffrey
>Fecha: Lunes, Marzo 6, 2006 7:37 ombr
>Asunto: Re: [PHP-DB] Retricting Access to Menu Items
>
> > I've done this kind of thing with a number of web apps.
> >
> > What I usually do is create a user table in MySQL with a user-name,
> > password and access level, which has an integer value.
> >
> > When a user logs in successfully, a session is created (see
> > session_start() in php documentation), the access level is pulled
> > from
> > the user table and saved as a session variable. Then it is a simple
> > matter of using bits of code like...
> >
> > if ($_SESSION['access_level'] > 7){
> > echo "some stuff";
> > }
> >
> > In your example, you will also want to check the user's access
> > level on
> > each restricted page - it is not enough to hide menu options. Users
> > could simply type the URL in.
> >
> > I hope that's clear.
> >
> > Good luck,
> >
> > Jeffrey
> >
> > Jeff Broomall wrote:
> > > Good morning everyone.
> > >
> > > I'm building a very simple content management site that tracks
> > "tasks.">
> > > The options available are:
> > > 1. Add Task
> > > 2. Edit Task
> > > 3. View Task
> > > 4. Print Task
> > >
> > > I need to restrict some users to only View and Print and I'm
> > trying to find a way to tell the page not to load the menu options
> > (the text) for those not having access to the Add and Edit functions.
> > >
> > > IOW, they would only see View and Print.
> > >
> > > I have three basic users:
> > > 1. System Admin
> > > 2. Subject Matter Expert (SME)
> > > 3. Viewers
> > >
> > > Obviously the System Admin and SME will have full access so it's
> > the Viewers that are to have access to only View and Print.
> > >
> > > I have a users table but haven't set it up for the distinction.
> > What I was thinking was creating a field labeled users_group and
> > assign a numeric value for each user using the numbering system above.
> > >
> > > I have my page load the menu options:
> > >
> > > Home
> > > View Tasks
> > > Edit Task
> > > Add Task
> > >
> > > into here...
> > >
> > >
> > >
> > >
> > align="center">>
> > >
ICAO Tasks
> > WAFS
>
> > >
> > >
> > > Menu
> > > <--The menu above
> > inserted here.
> > >
> > >
> > >
> > >
> > >
> > > How can I tell the system not to load the last two lines unless
> > they are a System Admin or SME?
> > >
> > > I read a chapter on Cookies/Sessions...but it wasn't that helpful
> > for this case.
> > >
> > > Can I setcookie('user_group', '3') and use that somehow???
> > >
> > > Am I in the ballpark with this solution?
> > >
> > > Thanks.
> > >
> > > Jeff
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>Este mensaje es exclusivamente para el uso de la persona o entidad a quien
>esta dirigido; contiene informacion estrictamente confidencial y legalmente
>protegida, cuya divulgacion es sancionada por la ley. Si el lector de este
>mensaje no es a quien esta dirigido, ni se trata del empleado o agente
>responsable de esta informacion, se le notifica por medio del presente, que
>su reproduccion y distribucion, esta estrictamente prohibida. Si Usted
>recibio este comunicado por error, favor de notificarlo inmediatamente al
>remitente y destruir el mensaje. Todas las opiniones contenidas en este
>mail son propias del autor del mensaje y no necesariamente coinciden con
>las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas,
>controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no
>contiene acentos.
>
>This message is for the sole use of the person or entity to whom it is
>being sent. Therefore, it contains strictly confidential and legally
>protected material whose disclosure is subject to penalty by law. If the
>person reading this message is not the one to whom it is being sent and/or
>is not an employee or the responsible agent for this information, this
>person is herein notified that any unauthorized dissemination, distribution
>or copying of the materials included in this facsimile is strictly
>prohibited. If you received this document by mistake please notify
>immediately to the subscriber and destroy the message. Any opinions
>contained in this e-mail are those of the author of the message and do not
>necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of
>its control, controlled, affiliates and subsidiaries companies. No part of
>this message or attachments may be used or reproduced in any manner
>whatsoever.
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Taking care of an auto_increment field!
am 07.07.2006 02:25:47 von MIGUEL ANTONIO GUIRAO AGUILAR
Hi pals,
I have a module in my PHP application that creates and id (string + the auto_increment field). I read the last auto_increment value from the table, then in my code I use it as the base to create a second id (the auto_increment field + string).
This happens for as many hardware the user has selected to send for repairment but, What if another user also is sending hardware for repairment? His process will also read the same auto_increment value from the table, will use it to create the second id field in my code, so, probably I will have ids like:
Last auto_increment value = 1
User A
VSA002
VSA003
User B
TUX002
TUX003
I have a constraint: The ID part (from string + the auto_increment field) should be continuos! I can not have two IDs with the same auto_increment value in it!!
Is there a way to use transactios in MySQL??
Or maybe using a global variable accesed by all the processes running in the server?
Or actually creating the auto_increment fields by inserting as many rows needed, but what if the user cancels the operatuion?
Or another different approach to solve this problem?
Regards,
Miguel Guirao
Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may b
e used or reproduced in any manner whatsoever.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Taking care of an auto_increment field!
am 07.07.2006 02:53:59 von Chris
> Is there a way to use transactios in MySQL??
Of course. They only work properly with innodb tables though. This is
all in the mysql documentation (http://dev.mysql.com)
> Or maybe using a global variable accesed by all the processes running in the server?
You could create a global 'sequence' table and use that to get the id's.
> Or actually creating the auto_increment fields by inserting as many rows needed, but what if the user cancels the operatuion?
What difference does that make? You'll have id's in the sequence but not
used anywhere. No big deal.
PS: Can you get rid of all that other crap when you send to a mailing
list? Sign up for a gmail or hotmail account or something (if you need
an invite let me know).
It should be pretty easy but I have not done it ever!
Regards,
Miguel Guirao
P.S. I can not get rid of of the below crap!! I know is annoying, but it's a policy!
Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may b
e used or reproduced in any manner whatsoever.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Populating an array to the next script!
am 07.07.2006 09:59:08 von Dimiter Ivanov
On 7/7/06, Miguel Guirao wrote:
>
>
> Hello,
>
> Is there a way to populate an array from one script to the next one?
> I'm using a form, and a hidden field for such desire:
>
>
>
> but it returns this:
>
>
>
> then I pretend to read the array again at the target script by coding the following:
>
> $hw=$_POST['hwt'];
> $hwGSM=$hw[0];
> for($i=0;$i<=$maxpoint;$i++){
> echo($hwGSM[$i]);
> }
>
> It should be pretty easy but I have not done it ever!
>
> Regards,
> Miguel Guirao
You have to make inputs for every element of the array. something like this :
foreach($hwGSM AS $key => $value){
echo "
}
And then after the submit you will have your array $hwt. PHP will make
an array out of all that inputs.
Another option you can use if you want a single input is to serialize
the array, on the form, and then unserialize it in the script
processing the form.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Populating an array to the next script!
am 07.07.2006 14:36:15 von Bastien Koert
stick the array in a session variable
Bastien
>From: Miguel Guirao
>To: php-db@lists.php.net
>Subject: [PHP-DB] Populating an array to the next script!
>Date: Thu, 06 Jul 2006 23:28:06 -0500
>
>
>
>Hello,
>
>Is there a way to populate an array from one script to the next one?
>I'm using a form, and a hidden field for such desire:
>
>
>
>but it returns this:
>
>
>
>then I pretend to read the array again at the target script by coding the
>following:
>
>$hw=$_POST['hwt'];
>$hwGSM=$hw[0];
>for($i=0;$i<=$maxpoint;$i++){
> echo($hwGSM[$i]);
>}
>
>It should be pretty easy but I have not done it ever!
>
>Regards,
>Miguel Guirao
>
>P.S. I can not get rid of of the below crap!! I know is annoying, but it's
>a policy!
>
>
>Este mensaje es exclusivamente para el uso de la persona o entidad a quien
>esta dirigido; contiene informacion estrictamente confidencial y legalmente
>protegida, cuya divulgacion es sancionada por la ley. Si el lector de este
>mensaje no es a quien esta dirigido, ni se trata del empleado o agente
>responsable de esta informacion, se le notifica por medio del presente, que
>su reproduccion y distribucion, esta estrictamente prohibida. Si Usted
>recibio este comunicado por error, favor de notificarlo inmediatamente al
>remitente y destruir el mensaje. Todas las opiniones contenidas en este
>mail son propias del autor del mensaje y no necesariamente coinciden con
>las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas,
>controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no
>contiene acentos.
>
>This message is for the sole use of the person or entity to whom it is
>being sent. Therefore, it contains strictly confidential and legally
>protected material whose disclosure is subject to penalty by law. If the
>person reading this message is not the one to whom it is being sent and/or
>is not an employee or the responsible agent for this information, this
>person is herein notified that any unauthorized dissemination, distribution
>or copying of the materials included in this facsimile is strictly
>prohibited. If you received this document by mistake please notify
>immediately to the subscriber and destroy the message. Any opinions
>contained in this e-mail are those of the author of the message and do not
>necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of
>its control, controlled, affiliates and subsidiaries companies. No part of
>this message or attachments may be used or reproduced in any manner
>whatsoever.
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php