Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi guys,
I have a form which a user has to fill in, but if certain fiels are incomplete or incorrect, I dont want the user to have to enter in all the details again. I am having problems with fiels of type file and textarea.
For example this works fine:Code: Select all
<p<?php if (!empty($arrErrors['sel_product_weight'])) echo ' class="formerror"'; ?>>
<label for="sel_product_weight">Product Weight:</label>
<input name="sel_product_weight" type="Text" id="sel_product_weight" value="<?php echo $_POST['sel_product_weight'] ?>"> <?php if (!empty($arrErrors['sel_product_weight'])) echo '<img src="red triangle600.jpg" width="16" height="16" hspace="5" alt=""><br />'; ?>
</p>This doesnt remember the value of what the user entered, fiels of type "file" and type "textarea"
Code: Select all
<p<?php if (!empty($arrErrors['sel_product_description'])) echo ' class="formerror"'; ?>>
<label for="sel_product_description">Product Description:</label>
<TEXTAREA name="sel_product_description" wrap="physical" ROWS=6 COLS=40 id="sel_product_description" value="<?php echo $_POST['sel_product_description'] ?>"> </TEXTAREA>
<?php if (!empty($arrErrors['sel_product_description'])) echo '<img src="red triangle600.jpg" width="16" height="16" hspace="5" alt=""><br />'; ?>
</p>
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
<p<?php if (!empty($arrErrors['sel_product_image'])) echo ' class="formerror"'; ?>>
<label for="sel_product_image">Product Image:</label>
<input name="userfile" type="file" id="userfile" value="<?php echo $_POST['sel_product_image] ?>">
<?php if (!empty($arrErrors['sel_product_image'])) echo '<img src="red triangle600.jpg" width="16" height="16" hspace="5" alt=""><br />'; ?>
</p>So how I can have it set so it does remember it next time around ?
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]