| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 61263 | 2005-08-30 06:04:00 | PHP - resize pictures on submission | Morgenmuffel (187) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 1357389 | 2005-09-02 01:50:00 | Working ok now in Opera | bartsdadhomer (80) | ||
| 1357390 | 2005-09-02 01:59:00 | Cheers Bartsdadhomer Thanks for all the help very much appreciated :thumbs: Now I can go get my breakfast |
Morgenmuffel (187) | ||
| 1357391 | 2005-09-08 01:39:00 | I'mm back, I am having another problem I'm adding the image upload script to an existing form and so far so good BUT if there is an error in one of the other fields on the form my error checking script drops back to the form and all the fields have the submitted values in them (like they should, with the error field highlighted) except for the image upload field, it reverts to being blank, is there a way to change this i have messed around with it heaps but can't get anything to show up ?> <tr valign="top"> <td <?php if(!$img) echo 'class="error"'; ?> valign="middle">Enter the Image you wish to use </td> <td><input type="file" name="file" id="file" value="<?= $file ?> " /></td> </tr> //The below one works, if an error is made in the form, the form is re called and the entered value is redisplayed (highlighted in Red) <tr valign="top"> <td valign="middle" <?php if(!$pn) echo 'class="error"'; ?> >Enter the Product Name here</td> <td><input type="text" name="prod_name" size="30" value="<?= $prod_name ?> "></td> </tr> I added the "value =" bit to the file upload field but it doesn't work let me rephrase that if i enter C:\project\images\bla . jpg and one of the other fields is in error then the form is recalled //as it should be all other input data is redisplayed in the input fields //those incorrect are highlighted //the file upload field is empty // should have C:\project\images\bla . jpg if I look at the source code of the page it says ?> <tr valign="top"> <td <?php if(!$img) echo 'class="error"'; ?> valign="middle">Enter the Image you wish to use </td> <td><input type="file" name="file" id="file" value="bla . jpg" /></td> </tr> note there is no path displayed and it can't be seen by the user so they will need to re-select the image Is there a way to display the filename and path in the file upload box, rather than having to re select the file every time an error occurs Cheers I tried reading through this . faqs . org/rfcs/rfc1867 . html" target="_blank">www . faqs . org but well it's a bit over my head |
Morgenmuffel (187) | ||
| 1 2 3 4 | |||||