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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.