Well, not much to go on, but I'd check variable scope, and register-globals.
The latter being more likely as I can't see how the scope would change if
you're just copying things over.
-Micah
On Friday 17 February 2006 2:18 pm, Chris Payne wrote:
> Hi there everyone,
>
> OK this script worked
Thanks to everyone that replied. All working great now thanks.
Warren
>>> Jochem Maas <[EMAIL PROTECTED]> 10/12/2004 2:47:28 pm >>>
try using the $_SESSION superglobal var (google is your friend if its
new to you.)
no need to register (still need to do session_start() though) just
do...
$
try using the $_SESSION superglobal var (google is your friend if its
new to you.)
no need to register (still need to do session_start() though) just do...
$_SESSION['MyValue'] = array(
'name' => $username,
'level' => $account_level
);
...or something like that. (also works for o
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Sessions and input form
Dear Aleks:
What I usually do for a situation like this is...
1) User fills out form and data is INSERTed into the table. If you
Dear Aleks:
What I usually do for a situation like this is...
1) User fills out form and data is INSERTed into the table. If you use
auto_increment for the row id, use PHP's mysql_insert_id to get the id and
use this for step 2.
2) Page confirms data by SELECTing the data from the MySQL table
Cheers to everyone...
the curly brackets was me not thinking after a boozy lunch, and trying to
recreate code, on an E-mail..
anyhoo...
I thought the best idea, and the simplest for me, was to remove the ' from
the session recall
Turning $_SESSION['salutation'] --> INTO --> $_SESSION[salutation
On Thu, 16 Oct 2003 13:33:28 +0100
[EMAIL PROTECTED] wrote:
> Not sure if this is a MySQL Q. or a PHP one, but here goes...
>
> I'm just learning sessions...
> And I'm trying to add a session variable to a MySQL database.
> I've done this page that takes the results from a previous form...
> But
Eeek, didn't notice your brackets. They're a bit messed up as well.
mysql_query("INSERT INTO $table (salutation, name, city)
VALUES (\"".$_SESSION['salutation']."\", \"".$_SESSION['name']."\",
\"".$_SESSION['city']."\");");
This MIGHT work :-)
-Original Message-
From: [EMAIL
Try this instead:
mysql_query("INSERT INTO $table (
salutation,
name,
city
} VALUES {
\"".$_SESSION['salutation']."\",
\"".$_SESSION['name']."\",
\"".$_SESSION['city']."\"
}
-
Thursday, October 16, 2003 9:08 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions and MySQL?
>
>
> From: <[EMAIL PROTECTED]>
>
> > And I'm trying to add a session variable to a MySQL database.
> > I've done this page that
From: <[EMAIL PROTECTED]>
> And I'm trying to add a session variable to a MySQL database.
> I've done this page that takes the results from a previous form...
> But I get this error:
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING'
> On line 83
> Which
on 26/2/03 12:58 pm, MaN at [EMAIL PROTECTED] wrote:
> And also use $_POST[SUBMIT] or set register_globals On
Just use $_POST[SUBMIT]
register_globals was turned off for security reasons. You are compromising
the security of your system if you turn it back on.
--
Mike Karthauser
Managing Direc
And also use $_POST[SUBMIT] or set register_globals On
> You need to register you varible first with the session
>
> -Original Message-
> From: David Rice [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] SESSIONS
>
>
>
> Her
You need to register you varible first with the session
-Original Message-
From: David Rice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SESSIONS
Here's something i can't get working it won't go to the last clause of this
pag
> I'm trying to create a temporary table through a query call in php and
> have no guiding documentation to refer to. I assume it can be created
> as any other query call. I would use CREATE INSERT but the insert
data
> is coming from a while loop. I understand that the temporary table
> require
> -Original Message-
> From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]]
> Sent: 05 January 2003 20:17
>
> Hello everybody
> I was trying to use Sessions, but I had some problems.
>
> I have an old version of the Apache, that comes with the
> Red Hat 7.2.
>
> when executin
ginal Message -
From: "Mika Tuupola" <[EMAIL PROTECTED]>
To: "Peter Beckman" <[EMAIL PROTECTED]>
Cc: "Dave Smith" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 11:30 AM
Subject: Re: [PHP-DB] Sessions Vs DB Access
>
On Sun, 24 Nov 2002, Peter Beckman wrote:
> Don't forget that you can use the DB to store PHP Sessions as well, which
> is faster than storing the sessions in /tmp on the file system. If you
> have well written SQL, you can have 5-30 queries per page, most of which
> should return the data in und
Don't forget that you can use the DB to store PHP Sessions as well, which
is faster than storing the sessions in /tmp on the file system. If you
have well written SQL, you can have 5-30 queries per page, most of which
should return the data in under 1/100 of a second.
I was running a site doing 1
Chris,
I'm assuming you're running this thing on *nix.
Session variables are stored on the file system. PHP writes them out to
/tmp, where it subsequently reads them upon request. The question is:
How good at caching is your DB? If it can cache common select queries,
then you are probably bett
Do this instead:
$user = mysql_fetch_object($sql_result);
$_SESSION['user'] = $user;
Then, you can use stuff like:
print "{$_SESSION[user]->name}";
// or if register_globals is on
print "$user->name"; // which is nice because you don't have to {} the var or
".$var[name]."
Peter
On Fri, 1 Nov
This is a very good tutorial about authentication using PHP and MySQL. If
you don't use database, you may still learn some thing about sessions from
there:
http://phpcomplete.com/content.php?id=72
Ruth
- Original Message -
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
You sould register sessions first, and if have been registered, are passing
with session_start() in each page at the top, before the tag..
If you want to pass variables from a page to another, put them in the url:
test.php?var=3&name=george (e.g.)
Be sure that the page you refer is dynamic (.ph
I just downloaded one yesterday from sourceforge
http://www.oscommerce.com/
It looks real solid, and easy to config via web interface.
On Thursday, May 23, 2002, at 09:56 AM, matt stewart wrote:
> i'd imagine there'll be a decent one on phpbuilder, or devshed, or
> webmonkey, or phpwizard
> if
ck it out in order to solve lots and lots of
questions.
Cesar Aracena
[EMAIL PROTECTED]
Neuquen, Argentina
- Original Message -
From: "James Kupernik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 11:47 AM
Subject: Re: [PHP-DB] sessions
&
way of solving the basket solution.
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 16:15
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sessions
>
>
> Thanks .. it is the wonders of open source.
>
> Are sessions required for
if you don't want people to log in, then sessions are really the only
sensible way of solving the basket solution.
-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 16:15
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] sessions
Thanks .. it is the wo
gt; -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 15:48
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sessions
>
>
> Do you know where there is any good tutorials on creating a php shopping
> cart?
>
> I enabled the auto.
riginal Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 15:48
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] sessions
Do you know where there is any good tutorials on creating a php shopping
cart?
I enabled the auto.session_start .. then took out session_start .. th
Do you know where there is any good tutorials on creating a php shopping
cart?
I enabled the auto.session_start .. then took out session_start .. that
seemed to do the trick.
Any help on php shopping carts would be great!
Thanks
"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTEC
sent the session_start(); before any output, that should do it...
-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 15:38
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sessions
I get this error when I try to start a session (I'm trying to create a
shopping c
> > -Original Message-
> > From: TJayBelt <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Thursday, October 18, 2001 8:28 AM
> > Subject: [PHP-DB] Sessions and Frames
> >
> >
> > >I have a site that is successfully using sessions and
authentication.
> > >However
I also suppose that something is printed before Header() function.
Suppose, that you have code:
I such a case NO BLANK characters are allowed after closing "?>" in included "xxx"
file. Newline is enough to produce an error, you have received.
Premysl Dedic,
Need, a.s. (Quest Group, a.s.
legion.org
<http://www.legion.org>
// //
> -Original Message-
> From: Dobromir Velev [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
> Sent: Thursday, October 18, 2001 3:50 AM
> To: TJayBelt; [EMAIL PROTECT
Hi,
Every different page in a framset is loaded separatly so the only thing you
should be aware of is not to output anything before the session stuff.
Also you can use the output control functions lie ob_start - check the PHP
manual for more info.
HTH
Dobromir Velev
-Original Message-
Fr
http://www.php.net/session
-Original Message-
From: nirat [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 06:46
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sessions in PHP
can anyone guide me to using sessions in PHP i've tried it a lot of
times
but its not working. any help tutorials
if you just want to refresh same page, then there shouldn't really be a
need, if you just do something like
or, if you mean refresh to another page, then you could use
the second one could also be used to send the location back to this page,
but make sure you do something conditional to keep
Doh!
I meant there is "NO dire need"
""Joe Brown"" <[EMAIL PROTECTED]> wrote in message
9cp3kv$3hj$[EMAIL PROTECTED]">news:9cp3kv$3hj$[EMAIL PROTECTED]...
> For this operation there is dire need for session management.
>
> And remember the default variable order EGPCS may cause you trouble if
> yo
when you build the string for the ahref just insert the value of $topidID
like so
echo 'link name here';
Steve
> -Original Message-
> From: DC [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 14:24
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions ???
For this operation there is dire need for session management.
And remember the default variable order EGPCS may cause you trouble if
you're sending a put variable across with the same name as a session
variable. Session vars take presidence in the global scope.
http://localhost/forums/view.php?
02, 2001 08:26:28
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB]
Sessions ???
Dave,What you need to do is make sure that the
variable: $topidID is being set to a value first (before you register it
you must get it from the table. Once it is
Thanks Steve;
I now have this in a session file in my tmp dir
topicID|s:1:"8";
Now how do i get the link to read http://localhost/forums/view.php?topicID=8
i think its along the lines of
http://localhost/forums/view.php3?PHPSESSIONID?topicID
I am banging away, the 4 books i have on Php are use
Dave,
What you need to do is make sure that the variable: $topidID is being set to a value
first (before you register it you must get it from the table. Once it is set you need
to register it as you did BUT WITHOUT the $. So it will say:
Make sure that session_start is ALWAYS before any head
try
session_register("topidID");
without the $
Steve
> -Original Message-
> From: DC [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 13:54
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Sessions ???
>
>
> Hi All
> I have a ? about setting a session.
>
> I have a functions.inc file and a
Hi,
> $test = "The session data was transferred.";
> echo "Click this link: test2.php";
change this to test2.php";
you need to specify a variable name first behind the ?. It worked
for me on NS 4.75
Johannes
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [E
Hi!
I had exactly the same problem and i found the script that does the job.
At the begining of your script write this:
if ( $rd == 1 )
{
$tmp_str_store = "var_list_str";
session_register ( "$tmp_str_store" );
$$tmp_str_store = "";
foreach ($HTTP_POST_VARS as $k => $v)
if (
Hi!
I had exactly the same problem with back/forward and i found the script that
does the job:
""olinux"" <> wrote in message
000a01c0c0aa$2d465050$6401a8c0@amdk7">news:000a01c0c0aa$2d465050$6401a8c0@amdk7...
I am using sessions to store variables until all forms have been filled out.
at
Here, I think you may be over - using session variables a bit...have not used them in
php, as I have version 3, which doesn't support them. However, by day I am an ASP
developer, and article after article I read warns about session variables! They are
great, but can hog
memory, especially if
Could you briefly outline how you store variables using sessions until the forms are
completed? Or point to a tutorial? thanx.
olinux wrote:
> I am using sessions to store variables until all forms have been filled out. at this
>point they are put into the db.
> I would like to know how i can
Hello Rob,
Tuesday, 20 March 2001, you wrote:
RW> I am trying to implement session support with mysql. I am using
RW> session.set_save_handler but don't really have a great set of functions does
RW> anyone have some good ones?
Try http://www.phpbuilder.com/columns/ying2602.php3
Mark
-
BDY.RTF
--
PHP Database 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]
51 matches
Mail list logo