You may wish to consider why you need to pass 30 lines of code in a

If the code is static, store it in include files and then pass it in
depending one a variable

if ($variable=1)
    { include(your30linefile);
     { inclue(someotherfile);

or to use a database query, pass a select value in as the index:

$sql = "select some_field from table where id_field = $variable

either way, you pass the value of $variable in from a page with this kind of

<a href="page_name.php?variable=1">click me to submit $varible=1 to

If the 30 lines of code is html that needs to be generated on the fly, break
it up into common blocks and drop them in using either method above.

You can also do things like passing a hidden form field instead of using a

Best regards,
Andrew Hill - OpenLink Software
Director Technology Evangelism
eBusiness Infrastructure Technology

On 2/15/01 10:20 PM, "Maxim Maletsky" <[EMAIL PROTECTED]> wrote:

> you can use sessions ..
> the session are cookies which will remember the user and will copy what you
> need on your system, making these 30 lines available only to him for the
> time you specify.
> Cheers,
> Maxim Maletsky
> -----Original Message-----
> From: Tanya Brethour [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 15, 2001 3:20 AM
> Subject: [PHP] Passing vars
> Quick question..
> If I have like 6 variables to pass to another PHP script... and some of
> the vars are actually multiple lines of text (lets say over 30 lines).
> What is the best way of doing this?
> I would like to avoid doing something like test.php?cheese=(30 lines of
> stuff)
> Thanks in advance!
> -Tanya

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to