This is a discussion on Auto submit a form in PHP within the PHP Language forums, part of the PHP Programming Forums category; Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Does anybody know how to auto-submit a form in PHP without Javascript?
For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data via post rather than URL. Could serialize a few fields to URL, but there is a larger comments field that I think needs to be posted instead. Auto-post the form variables possible? Thanks, Scott |
|
|||
|
Scott Castillo wrote:
> Does anybody know how to auto-submit a form in PHP without Javascript? > > For instance, submit form variables to self, validate the data in PHP on > same page, then, if no errors, continue with processing the data, which might include writing to a database, or mailing someone, ... > auto-submit the data via post rather than URL. You already have the data (and it is already validated). Why repost and revalidate? If there's a validation error stop processing and inform the user. > Auto-post the form variables possible? No. -- USENET would be a better place if everybody read: : mail address : http://www.catb.org/~esr/faqs/smart-questions.html : is valid for : http://www.netmeister.org/news/learn2quote2.html : "text/plain" : http://www.expita.com/nomime.html : to 10K bytes : |
|
|||
|
"Scott Castillo" <scasti2@cox.net> escribió en el mensaje news:nHtlc.57610$Jy3.10102@fed1read03... : Does anybody know how to auto-submit a form in PHP without Javascript? NO :-( : : For instance, submit form variables to self, validate the data in PHP on : same page, then, if no errors, auto-submit the data via post rather than : URL. Could serialize a few fields to URL, but there is a larger comments : field that I think needs to be posted instead. OH! header() function is your friend :-) Example: Load you init page.php then evaluate your variables. If variable is validate then header redirect you new page. : : Auto-post the form variables possible? Explicit NO. Best regards. -- Mauro Morales M. mailto:mmm@tierramedia.org Linux User # 160358 |
|
|||
|
You can't autosubmit with PHP because it's a backend technology. Submit is
a front end action. "Scott Castillo" <scasti2@cox.net> wrote in message news:nHtlc.57610$Jy3.10102@fed1read03... > Does anybody know how to auto-submit a form in PHP without Javascript? > > For instance, submit form variables to self, validate the data in PHP on > same page, then, if no errors, auto-submit the data via post rather than > URL. Could serialize a few fields to URL, but there is a larger comments > field that I think needs to be posted instead. > > Auto-post the form variables possible? > > Thanks, > > Scott > > |
|
|||
|
"Scott Castillo" <scasti2@cox.net> wrote in message news:<nHtlc.57610$Jy3.10102@fed1read03>...
<snip> > Auto-post the form variables possible? Perhaps you're looking for Post2Host script ?? <http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51> -- | Just another PHP saint | Email: rrjanbiah-at-Y!com |