php form automation

Hello

Is there anyway i can automate a form with php so it automatically submits the form with out hitting the submit button?

Thanks Paul
submissiontechnologyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Diablo84Commented:
You can do this with html depending on exactly how you want it to work, eg: the following uses the body onload event (so it will be submitted as soon as the page loads):

<html>
<head></head>
<body onload="document.form1.submit()">

<form action="a.php" method="post" name="form1">
<input type="text" name="test" value="text">
<input type="submit" name="Submit">
</form>

</body>
</html>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
submissiontechnologyAuthor Commented:
Ok cool

But how could I submit the form with out going to the next page? ie streem the data
0
Diablo84Commented:
You might need to use curl for what you are doing which requires you to have the curl package installed on your server, see:

http://us2.php.net/manual/en/ref.curl.php

Theres an example of use here: http:Q_20743403.html
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

submissiontechnologyAuthor Commented:
yeah I have used that b4 thanks
0
submissiontechnologyAuthor Commented:
Any got any examples of how i would do it with curl?
0
Diablo84Commented:
Theres a nice example/tutorial here: http://www.phpfreaks.com/print.php?cmd=tutorial&tut_id=49

If you need more example of use i will let someone with more experience with curl help you out.

Best Wishes.
0
jmsloanCommented:
What do you want to trigger the submit?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.