Re: [PHP] passing variables between pages without using url??

2001-11-03 Thread Steve Werby

"sunny AT wde" <[EMAIL PROTECTED]> wrote:
> Ok, but how do I use post when using Header??

You don't.  What are you trying to achieve that makes this necessary?

> I would like to have a form, but I don't know how I would make the
> script automatcially re-direct in a form... becase I know how to use
> form variables that way.

In the HTML  element the "action" attribute specifies the file that
will process the form.  If your first form is form1.php and your second is
form2.php then on form1.php you'd have this:



And form2.php would include the PHP code necessary to process form1.php.  If
that doesn't make sense maybe you can include some code or explain in more
detail what you're trying to accomplish and what the problem you're facing
is.  It's late here so maybe I'm just not thinking clearly.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] passing variables between pages without using url??

2001-11-03 Thread sunny AT wde

Ok, but how do I use post when using Header??

I would like to have a form, but I don't know how I would make the
script automatcially re-direct in a form... becase I know how to use
form variables that way.

But all I can think of is using header, yet that displays the
variables as its like get :(

/sunny

--- Steve Werby <[EMAIL PROTECTED]> wrote:
> "sunny AT wde" <[EMAIL PROTECTED]> wrote:
> > i've written a form, which passes value to a ph script to insert
> them
> > into mysql. from there on, i forward onto another page, but using
> :
> > header("Location: http://www.foo.com/foo2.php?id=4&user=foo";);
> >
> > now i really don't want to have the url on the next page looking
> like
> > that because people might change the values, refresh the page and
> > mess up my database.
> >
> > so is there any other ways i can pass values on??
> 
> Perhaps you should consider using the POST method instead of the
> GET method.
> Then the variables are not displayed in the query string.  If you
> are
> passing across a series of pages, after the first page you'll want
> to add
> the variables you're going to pass to hidden input fields or use
> session
> variables which will make the variables available throughout the
> user's
> session or until you destroy the session.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] passing variables between pages without using url??

2001-11-03 Thread Steve Werby

"sunny AT wde" <[EMAIL PROTECTED]> wrote:
> i've written a form, which passes value to a ph script to insert them
> into mysql. from there on, i forward onto another page, but using :
> header("Location: http://www.foo.com/foo2.php?id=4&user=foo";);
>
> now i really don't want to have the url on the next page looking like
> that because people might change the values, refresh the page and
> mess up my database.
>
> so is there any other ways i can pass values on??

Perhaps you should consider using the POST method instead of the GET method.
Then the variables are not displayed in the query string.  If you are
passing across a series of pages, after the first page you'll want to add
the variables you're going to pass to hidden input fields or use session
variables which will make the variables available throughout the user's
session or until you destroy the session.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]