Cless Posted July 26, 2007 Share Posted July 26, 2007 Hello, Is there a way to set POST data without using a form? Thanks. Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 26, 2007 Share Posted July 26, 2007 Do you mean for testing your scripts or do you wish the user to send form data without having to submit a form? Quote Link to comment Share on other sites More sharing options...
Cless Posted July 26, 2007 Author Share Posted July 26, 2007 Sending post data without a form. Because, I use a method to prevent page refreshing. It uses header("location: ''"), and sends the user to a page which submits the POST Data. However, in that page; I need it to create POST Data so I can send it back to the old page, and it will display a success message. I could use another page, however, I don't want to change all of those things... Just a ton of more things to do. Quote Link to comment Share on other sites More sharing options...
ss32 Posted July 26, 2007 Share Posted July 26, 2007 by doing a bit of searching i fount that the curl libraries/classes are what you would need to do this job. btw, why dont you just send GET data and have it reinterpreted as POST data in your old script? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 26, 2007 Share Posted July 26, 2007 curl sends a request from the server. It does make the user send the requests. I don't think it's possible to force the user to do so. Quote Link to comment Share on other sites More sharing options...
Cless Posted July 26, 2007 Author Share Posted July 26, 2007 Ooo... But wouldn't that display the variable in the URL? Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 26, 2007 Share Posted July 26, 2007 Sending post data without a form. Because, I use a method to prevent page refreshing. It uses header("location: ''"), and sends the user to a page which submits the POST Data. However, in that page; I need it to create POST Data so I can send it back to the old page, and it will display a success message. I could use another page, however, I don't want to change all of those things... Just a ton of more things to do. Ok, that isn't making any sense to me. But, have you thought about using SESSION to store the data? Quote Link to comment Share on other sites More sharing options...
Cless Posted July 26, 2007 Author Share Posted July 26, 2007 Oh yeah, I forgot about Sessions. I tried it, and it worked perfectly! Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.