dreamwest Posted January 21, 2009 Share Posted January 21, 2009 Is it possible to automatically submit a form when the page is visited: <form action="import.php" method="POST"> <input maxLength=100 size=40 name="photos" value="photos"> <input type="submit" value="Import Photos" name="submit"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/ Share on other sites More sharing options...
haku Posted January 21, 2009 Share Posted January 21, 2009 Only through javascript. Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741948 Share on other sites More sharing options...
dreamwest Posted January 21, 2009 Author Share Posted January 21, 2009 How can i change this code around so i dont have to use javascript?? <form action="import.php" method="POST"> <input maxLength=100 size=40 name="photos" value="photos"> <input type="submit" value="Import Photos" name="submit"> </form> Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741950 Share on other sites More sharing options...
Philip Posted January 21, 2009 Share Posted January 21, 2009 Is it possible to automatically submit a form when the page is visited: Umm, why would you want to automatically submit nothing? If you're wanting to submit something with POST via PHP - look into curl. Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741953 Share on other sites More sharing options...
Zane Posted January 21, 2009 Share Posted January 21, 2009 That code has no javascript in it....so you've answered your own question Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741955 Share on other sites More sharing options...
haku Posted January 21, 2009 Share Posted January 21, 2009 How can i change this code around so i dont have to use javascript?? You can't. It is impossible to auto-submit a form using only PHP. Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741956 Share on other sites More sharing options...
dreamwest Posted January 21, 2009 Author Share Posted January 21, 2009 That code has no javascript in it....so you've answered your own question ??? Quote Link to comment https://forums.phpfreaks.com/topic/141727-automatically-submit/#findComment-741960 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.