Jump to content

php and html


napsternapster

Recommended Posts

hi..

 

I have 3 html forms the 1st one is the original or complate start form.when the user uploads a rong formated document or the document is greater than 4 megs of bytes an error must be shown on error form which  has all the textbox,submit button and upload textbox/button .when a rong format or large sized document is uploaded the second form shows with the error and the 3rd its an edit/correction formwhich has 2 buttons the cancel and the overwrite.

 

//form 1

<?php

$display .= "<form enctype=\"multipart/form-data\"  method=\"POST\"  action=\"Upload.php\">

<p><b>Uploading a document</b></p>

<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"409600\">

<table width=\"50%\" align=\"left\">

<tr><td align=\"center\">Document Description:</td>

<td align=\"left\"><input type=\"text\" name=\"txDesc\" size=32 maxlength></td></tr>

 

<tr><td align=\"center\">Document to Upload: </td>

<td align=\"left\"><input type=\"file\" name=\"fileUpload\" id=\"fileUpload\"></td></tr>

 

<tr><td align=\"center\"><input type=\"submit\" value=\"Submit\"></td></tr>

</table>

</form>";

?>

//form 2

<?php

$display .= "<form enctype=\"multipart/form-data\"  method=\"post\"  action=\"\">

<p><b>Uploading a document</b></p>

<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"409600\">

<table width=\"50%\" align=\"left\">

<tr><td align=\"center\">Document Description:</td>

<td align=\"left\"><input type=\"text\" name=\"txDesc\" value =\"$desc\"size=32></td></tr>

 

<tr><td align=\"center\">Document to Upload: </td>

<td align=\"left\"><input type=\"file\" value\"$link\" name=\"fileUpload\" id=\"fileUpload\"></td></tr>

 

<tr><td align=\"center\"><input type=\"submit\" value=\"Submit\"></td></tr>

 

</table></br/>

<tr><td><pre> </tr></td>

<tr><td><br /><br /></tr></td>

<tr><td><div align=\"left\"style=\"color:red\" align=\"bottom\">$str</div></td></tr>

</form>

";

 

?>

 

//form 3

<?php

 

$displaying .= "<form  action=\"$_SERVER[php_SELF]\" action=\"\" method=\"post\">

 

<p><strong>Uploading a document</strong></p>

 

<table width=\"50%\" align=\"left\" border=\"0\">

<tr><th align=\"center\">$desc</th></tr>

<tr><td align=\"center\">$link</td></tr>

 

 

<input type=\"hidden\" name=\"O\" value=\"Over\">

<input type=\"hidden\" name=\"C\" value=\"Cancel\">

 

<tr><td align=\"center\"><br><input type=\"submit\"  name=\"btnOverwrite\" value=\"Overwrite\">

<input type=\"submit\"  name=\"btnCancel\" value=\"Cancel\"> </td></tr>

 

<tr><td align=\"center\"  style=\"color:orange\"><p style=\"text-align:justify\">The Name already exist.<br>

Select Overwrite to save new uploaded document. <br>Cancel not to procede saving the new document.</p></td></tr>

</table>";

 

?>

 

 

my problem when I click overwrite i return to the first form with out the information.it suppose when u click overwrite it sends the data back to were was fromfoun 

Link to comment
https://forums.phpfreaks.com/topic/145396-php-and-html/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.