Click to See Complete Forum and Search --> : Automate form entry with php


llamatron
12-21-2003, 08:14 AM
I have a form that I need to fill out a few times and was wondering if I could use PHP to do this.

It is a standard form generated from an .ASP page. I tried to use javascript to fill the form fields out and autosubmit and I'm sure I got the logic right but it came up with an access denied error, presumably due to Javascript security.

Can you do this with PHP?

i.e Get the form page, get PHP to autofill in the fields on the form and then get PHP to autosubmit. Just a simple example should send me on my way.

Thanks.

Pittimann
12-21-2003, 12:24 PM
Hi!

I honestly don't understand why you want that. Get data, autofill a form and autosubmit - to me it seems the same like leaving the data where they already are.

Can you explain a bit more detailed, what you actually want?

Cheers - Pit

llamatron
12-21-2003, 01:59 PM
Okay. It is a PHP based rating site where I have multiple profiles as I'm experimenting with autorating with javascript code which now works beautifully. However I need to fill the profiles out completely or they get deleted, which is fair enough.

So I need to log onto the website as the first user, go to the edit profile page where it asks for about 20 fields to be filled in. I need to fill them in, log out and log in as the next profile and repeat the process several times. I don't want to do it manually. I can autologin to the site using javascript no problem but when I try to use javascript to fill the form fields in on the edit profile page which i open in a new window, Internet Explorer wont let me even though I've set IE up to allow javascript across domains. It says access denied so I guess I need to use a server side scripting language to do this.

Any pointers?