I currently have this:
function submit()
{
document.getElementById("lostpasswordform").click(); // Simulates button click
document.lostpasswordform.submit(); // Submits the form without the button
}
<body onload="submit()">
<form name="lostpasswordform" id="lostpasswordform" action="/" method="post">
<input type="hidden" name="user_login" id="user_login" class="input" value="<?php echo ($user_login); ?>" />
</form>
</body>
it works on PC, but for some reason, javascript is not execute from iPhone so I’m wondering if theres a way to auto-submit the form using PHP instead of JS?
Thanks
There’s no way to trigger a form submission server-side. You’d have to use a language that works in the DOM like JavaScript for this one. From what you’ve given us, I don’t see why it wouldn’t work with the way you have it set up now.
Check your code and if it still doesn’t work, I’d suggest asking this question in a different context; something along the lines of getting your JavaScript to work on the iPhone instead of dumping it altogether.