[SOLVED] POST data with no user interaction (no form)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

POST data with no user interaction (no form)

Post by malcolmboston »

i have the need to be able to post data through the URL without the need for the user to fill it out.

Ill explain what im doing

we have a form that is designed for logins, this form is directed to login_handler.php which is a sole function with nothing else on the page, it handles login requests and cookies.

After this page i then go to loading.php which then generates a list of success and failures to the user such as whether a cookie was set, user preferences loaded etc.

now unfortunately, with my current system ($_GET) the url looks like this
loading.php?type=login_nocookie

i need to transparently send post data from the login_handler page which requires absolutely no user interaction.

I know this can be done but have no idea how (well i know its javascript anyway)

Any help would be great.
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

there are a few different ways of doing this, but javascript would be at the bottom of my list.

I would try Snoopy or CURL, or if you want to do it the hard way like I did then check out this link viewtopic.php?t=7063
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

cURL and snoopy are definitely at the bottom of my list, complete overkill in my opinion.

All i need is a form that can submit itself, pretty simple but i dont know the code.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

what is wrong with using a session?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

yeah sorry for not updating this topic....

i solved this yesterday by creating a $_SESSION var and then deleting it as soon as it is used
Post Reply