napsternapster Posted February 16, 2009 Share Posted February 16, 2009 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 Quote Link to comment Share on other sites More sharing options...
napsternapster Posted February 16, 2009 Author Share Posted February 16, 2009 It suppose to send data to the database not taking back the first form. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.