a parte che ovviamente il file , visto che usi multipart, non ti conviene salvarlo da nessuna parte ...


cmq non ho capito cosa hai scritto ...

ecco un esempio scritto al volo ...

SimpleForm.class.php
codice:
class SimpleForm {
	// andr3a [06/06/2005] www.devpro.it
	function SimpleForm() {
		if(!isset($_SESSION))
			session_start();
	}
	function load($session_value, $method, $clear = true) {
		if(isset($_SESSION[$session_value])) {
			$this->__method($method);
			for($a=0, $b = count($_SESSION[$session_value]); $a<$b; $a++)
				foreach( $_SESSION[$session_value][$a] as $key => $value)
					$GLOBALS[$method][$key] = $value;
			if($clear)
				unset($_SESSION[$session_value]);
		}
	}
	function save($session_value, $method) {
		$this->__method($method);
		$_SESSION[$session_value] = Array();
		foreach($GLOBALS[$method] as $key => $value)
			array_push( $_SESSION[$session_value], Array($key => $value));
	}
	function __method(&$method){
		$method = '_'.strtoupper($method);
		if(!isset($GLOBALS[$method]))
			$GLOBALS[$method] = Array();
	}
}


1.php
codice:
<?php
require 'SimpleForm.class.php';

$SF = &new SimpleForm();
$SF->load('immanuel', 'post');

$nome = isSet($_POST['nome']) ? htmlentities($_POST['nome']) : '';

?>
<form method="post" action="2.php">
<input type="text" name="nome" value="<?php echo $nome; ?>" />
<input type="submit" name="Submit" value="Invia" />
</form>

2.php
codice:
<?php
require 'SimpleForm.class.php';

$SF = &new SimpleForm();
$SF->save('immanuel', 'post');

?>
torna indietro