Hey I need a simple script. I don't know PHP so I will be grateful if you can give me the full code.
In form.html I have
<form method="POST" action="output.php">
<p><input type="text" name="T1" size="20"></p>
<p><input type="text" name="T2" size="20"></p>
<p><textarea rows="2" name="S1" cols="20"></textarea></p>
<p><textarea rows="2" name="S2" cols="20"></textarea></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
I need a page (output.php) in which I can:
- Check and reject if fields are filled. Also allow some fields empty.
- Limit fields by words.
- I should be able to add more fields and textarea and it should work.
- If textarea has "Enter" or "double space" the output must show exactly like that adding <Br> and space.
- If possible limit word count of two and more fields (S1+S2 = Less than 250 words).
If It is not complete it should say click here and go back to form.html and if everything is okay show all the data in output.php (Like T1 = Games, etc...).
That's it
PS: It would help if I can do everything without touching the output.php like
For making a field required:
<input type="text" name="T1_required" size="20">
For limiting words (250 or less):
<textarea rows="2" name="S1_limit_250" cols="20"></textarea>
For limiting words in 2 fields (250 or less):
<textarea rows="2" name="S1_limit_A_250" cols="20"></textarea>
<textarea rows="2" name="S2_limit_A_250" cols="20"></textarea>
<textarea rows="2" name="S3_limit_A_250" cols="20"></textarea>
<textarea rows="2" name="S4_limit_B_100" cols="20"></textarea>
<textarea rows="2" name="S5_limit_B_100" cols="20"></textarea>
A will tell output.php so it would count for S1, S2 and S3 and total words should not be more than 250.
B will tell output.php so it would count for S4 and S5 and total words should not be more than 100.
Thanks once again.