Say Im reading a thread or browsing threads
at read.php?tid=1 or category.php?cid=1 respectively
And my form post_form.php which is included(); uses this value for a few isset functions to make sure there is a subject and body, however the form action is pointing to post.php which handles the form, so if no body and subject is submitted, the ?tid or ?cid is lost and the form brings you to posts.php
What would be the best way to pass the post form the parent tid? or cid? value?
You can use
type="hidden"INPUT elements to include values you don’t want the user to see/manipulate.Also, if you need to load the CID/TID data into form fields, you can try the following (with hidden fields instead, I used text fields so you could see it working):
http://jsfiddle.net/userdude/Vuenp/1/
(Note the above needs to run AFTER the form is parsed.)
Of course, this would be easier if you used jQuery.