note 109061 modified in function.implode by danbrown

From: Date: Mon, 18 Jun 2012 14:15:25 +0000
Subject: note 109061 modified in function.implode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-188667@lists.php.net to get a copy of this message
A simple way to get the Values from user	and save them in a text file.

<?php
if(isset($_POST['new_name'])){
		$file=fopen('Data.txt','a');
		$data[0]=$_POST['new_name'];
		$data[1]=$_POST['new_email'];
		$data[2]=$_POST['new_site'];
		$data[3]=$_POST['new_msg'];
		$data=implode("##",$data);
		fputs($file,$data . "\\n");
		
	}
	fclose($file);
?> --was-- A simple way to get the Values from user and save them in a text file. if(isset($_POST['new_name'])){ $file=fopen('Data.txt','a'); $data[0]=$_POST['new_name']; $data[1]=$_POST['new_email']; $data[2]=$_POST['new_site']; $data[3]=$_POST['new_msg']; $data=implode("##",$data); fputs($file,$data . "\n"); } fclose($file); http://php.net/manual/en/function.implode.php

« previous php.notes (#188667) next »