You are here: Re: help needed - passing values between two loads of the same page « PHP Programming Language « IT news, forums, messages
Re: help needed - passing values between two loads of the same page

Posted by romain.jouin on 09/20/05 22:58

I never used ob_start() and ob_end_flush() , but you can check the
manual page :

http://mx2.php.net/manual/en/function.setcookie.php

it says :

" As of PHP 4, you can use output buffering to send output prior to the
call of this function, with the overhead of all of your output to the
browser being buffered in the server until you send it. You can do this
by calling ob_start() and ob_end_flush() in your script, or setting the
output_buffering configuration directive on in your php.ini or server
configuration files."

Another "make it yourself" solution would be to define a javascript
function that you call on the "onload" event of the page. as you have
to put it on the "body" balise, you make it calling the "submit" event
of an hidden form that call another javascript function with your
string as a param (string that you know at the end of your php script".
This last function accessing a cookie... But as you don't want your
page to be sent, you have to make this function to return false (abort
the sending process).
Yes, A little bit tricky...

<body onload=document.forms[3].submit()>
<form 1>
....
<form 2>
....
<form 3>
<input type=submit onsubmit="set_cookie(ccvs_string)">

<javascript
function set_cookie(param)
{
....
return false;
}
>

ok, that is a first jet... Sure there is simpler to do it, check php
manual...
Regards,
JR.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация