[PHP] Re: passing variables to scripts

2002-04-28 Thread Yuri Petro

Which version of PHP you're running? May be you need to set register_globals
= On in your php.ini file.

--
Kind regards,
Yuri.

 www.AceHoster.com  Quality web hosting


Mark Gallagher [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 (yes, newbie - but I *have* tried everything I know, I swear)

 I'm trying to write a comments system for my site (because I think I
 can).  Basically, the script receives the ID of a particular entry (the
 site is a blog) via ?entry_id=entry_id.  It checks to see if there's
 a corresponding text file (entry_id.txt) and if so, it prints the
 contents of the text file and invites the user to input a comment.  If
 not, it prints no comments and invites the user... yadda yadda.

 Now, unless I'm mistaken, passing the arguments are done like so:
 http://www.foo.com/comments.php?entry_id=test
 Right?

 Unfortunately, it doesn't work.  That is to say, everything about the
 script works, except recognition of the $entry_id variable.  Something
 as simple as: titlecomments for entry ?php echo($entry_id);
 ?/title returns titlecomments for entry /title.

 Saving the text file's URL to a variable:
 ?php
 $filename = http://www.foo.com/$entry_id; .txt;
 ?

 Doesn't work either.

 I had a semi-hunch (brought on by my own inexperience, no doubt) that
 maybe I had to start a session or something on the referring page. Tried
 that (session_start();), didn't have any effect.  Bah.

 Can anyone point out what I'm doing wrong?

 TIA

 --
 Mark Gallagher




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




[PHP] Re: passing variables between scripts?

2001-08-31 Thread Paul Procacci

Sessions would definately save the data.  :)

Jon Thompson Coon wrote:

 I can't cope the fact that I loose my variables every time I reload the
 page. If someone could point me to the right direction, I'd be grateful.

 Present problem:

 I have a script that has some globals (surprise). Within this script,
 pretty deep in a function call tree, a function saves a query into an
 array and saves it to a global. Then an user makes an selection and the
 script reloads itself. After this I'd like to my hands on the saved
 query, but the global variable where it's saved seems to get initialised
 on reload. How to get around this? Sessions? I'm pretty new (a
 forthnight and wery little documentation) to server side programming, so
 I'm probably misunderstanding some basics.

 Most of my problems are related to this area, so anyone bold enough to
 anwer will probably pounded with several questions more.

 Thank you in advance
 Jon Thompson Coon


-- 
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]




[PHP] Re: passing variables between scripts? End of story

2001-08-31 Thread Jon Thompson Coon

Thank you. Question answered. Several times over.


-- 
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]