1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<?php
if(isset($_POST["envoyer"]))
{
if($_POST["texte"]==""){
echo "Erreur champ vide";
}
else{
echo "tout est ok";
}
}
?>
<html>
<head>
<style type="text/css">
<!--
#uploadFrame { display: block; width:800px; height:400px; border:1px solid #000;}
//-->
</style>
<script language="JavaScript" type="text/javascript">
function loadPage(url){
document.getElementById('uploadFrame').contentWindow.document.location.href=url;
}
</script>
</head>
<body>
<form name="listes" action="#" method="post">
<label class="textarea">Texte:</label>
<textarea cols="50" rows="10" name="texte"><?php
if (!empty($_POST["texte"])) {
echo stripcslashes(htmlspecialchars($_POST["texte"],ENT_QUOTES));
}?></textarea>
<br/>
<input onclick="javascript:loadPage('upload.php');" name="envoyer" value="Valider" type="submit"/>
</form>
<form id="uploadForm" enctype="multipart/form-data" action="upload.php" target="uploadFrame" onsubmit="uploadRun();" method="post">
<input id="uploadFile" name="uploadFile" type="file" />
<input id="uploadSubmit" type="submit" value="Upload" />
</form>
<iframe id="uploadFrame" name="uploadFrame" src="#"></iframe>
</body>
</html> |
Partager