php form automation

Posted on 2004-11-30
Last Modified: 2008-02-01

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

Thanks Paul
Question by:submissiontechnology
    LVL 27

    Accepted Solution

    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):

    <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">


    Author Comment

    Ok cool

    But how could I submit the form with out going to the next page? ie streem the data
    LVL 27

    Expert Comment

    You might need to use curl for what you are doing which requires you to have the curl package installed on your server, see:

    Theres an example of use here: http:Q_20743403.html

    Author Comment

    yeah I have used that b4 thanks

    Author Comment

    Any got any examples of how i would do it with curl?
    LVL 27

    Expert Comment

    Theres a nice example/tutorial here:

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

    Best Wishes.
    LVL 3

    Expert Comment

    What do you want to trigger the submit?

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now