All pastes #89784 Raw Edit

Anonymous

public php v1 · immutable
#89784 ·published 2006-07-16 23:58 UTC
rendered paste body
<?phpecho '<html><body>'if(!empty($_POST)) {	if(isset($_POST['title'])) { //you can check as many vars as you want here		// Where the file is going to be placed 		$target_path = "uploads/";				/* Add the original filename to our target path.  		Result is "uploads/filename.extension" */		$target_path = $target_path.basename($_FILES['uploadedfile']['name']); 		//$_FILES['uploadedfile']['tmp_name']; ?? whats this doing				print_r($_POST);		print_r($_FILES);	} else {		die('uhoh hot dog');	}	} else {	//print form	echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="addcomic">	<label for="title">Title: </label><input type="text" id="title" name="title" /><br />	<label for="coverpicture">Cover: </label><input type="file" id="coverpicture" name="coverpicture" /><br />	<label for="publisher">Publisher: </label><input type="text" id="publisher" name="publisher" /><br />	<label for="volume">Volume: </label><input type="text" id="volume" name="volume" /> br />	<label for="issue">Issue: </label><input type="text" id="issue" name="issue" /><br />	<label for="date">Date: </label><input type="text" id="date" name="date" /><br />	<label for="coverprice">Cover Price: </label><input type="text" id="coverprice" name="coverprice" /><br />	<input type="submit" name="Submit" />	</form>';}echo '</body></html>';