Autofilling a form on a webpage

Posted on 2004-09-29
Last Modified: 2008-03-06
I need to fill forms on different websites without write from the keyboard in the fields, but sending to this webpages information stored in a .txt file. Some ideas?
I have all the information in the .txt file.
I know what different forms need and I'd like to fill these forms not writing with the keyboard but exchanging data stored in the .txt file.
Roboform is an idea but unfortunately is only for personal data.
Question by:micba
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Expert Comment

ID: 12178279
use fread to read the file...

then maken sure all the values are seperated with a unique sign (like | )

then use explode to seprated all the values, and fill them into the form

<input value=<? echo $thevalue1; ?>

get it?
LVL 18

Expert Comment

ID: 12179522
you may try to use the GET method

i.e find the submiting page and redirect like
create a str like
var str = "".<? echo $thevariable1name; ?>."=." <? echo $thevariable1value; ?>."&".<? echo $thevariable2name; ?>."=." <? echo $thevariable2value; ?>.

header('Location:" str);

Author Comment

ID: 12274644
Unfortunately in the website there is the POST method...
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users


Accepted Solution

php-webdesign earned 250 total points
ID: 12276083
the you do

echo $_POST['thevalue'];
LVL 18

Assisted Solution

armoghan earned 250 total points
ID: 12295188
Make one your own page which onLoad do the submit thing using java script. and fill the variables in it using php. You can call the page from the above method as well

pass the parameters to your page like
var str = "".<? echo $thevariable1name; ?>."=." <? echo $thevariable1value; ?>."&".<? echo $thevariable2name; ?>."=." <? echo $thevariable2value; ?>.

and this page "mypage.php" auto posts on load

Expert Comment

ID: 12491957
well... i think you can split the points... armoghan and me gave proffesional response. Both the other side is that there is no solution... although the author gave no response to the last feedback given.
LVL 18

Expert Comment

ID: 12492478
i agree :)

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 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