Autosubmitting HTML form -- anything besides Javascript?

OTrap

Elite Member
Joined
Jul 12, 2008
Messages
2,314
Reaction score
1,064
Since the form is in HTML, I assume this still fits in this forum.

I have a form:

Code:
<form name="form">
<input id="field" name="field" value="<?php print $somephp; ?>" />
<input type="image" src="images/buttons.png" alt="Post!" />
</form>

Up to this point, I've been using a little Javascript to autosubmit it.

Code:
<script language="JavaScript">
document.forms['form'].submit(0);
</script>

The problem is, some of the people who visit the page have Javascript disabled.

So my question is this: Is there another way to auto-submit the form without Javascript?

Thanks!
 
You could use a meta redirect, since you know the submitted value beforehand.
 
What would that look like? My apologies, but I've never done much with METAs.
 
You could use PHP to send the post request directly without using a form.

Reference:
Code:
http://www.php.net/manual/en/httprequest.send.php
 
Back
Top