blogit Posted June 2, 2008 Share Posted June 2, 2008 I'm using phplist to handle newsletter sign ups, the action url is http://www.domain.com/lists/?p=subscribe I'd like to have the action handled by a php file instead, so anyone viewing the source wont see off hand the url in the action. I know basic form handling and using mail() with variables but how can I have the form variables sent to the url using a php file. The only thing i could come up with is below but my coding is not that great so i have no other ideas on how to pass the data to the url. Any advice is appreciated... thanks <?php if (!isset($_POST['subscribe'])) { ?> <form action="http://www.domain.com/lists/?p=subscribe" method="post"> </form><?php } ?> Quote Link to comment Share on other sites More sharing options...
discomatt Posted June 2, 2008 Share Posted June 2, 2008 The action IS handled by a php file In order to send information to a certain page, the user has to know what page to send it to. Quote Link to comment Share on other sites More sharing options...
prime Posted June 2, 2008 Share Posted June 2, 2008 you could use ajax to send the data, but if the user examines the script the url to the file will still be present.... Quote Link to comment Share on other sites More sharing options...
FlyingIsFun1217 Posted June 3, 2008 Share Posted June 3, 2008 Well, one thing I see right off the bat is that your action script needs to be relative to the form page it's calling it from. If your action script is in the same directory as your form page, just use the name of the script (with, in your case, additional arguments). No need for http://..., my man FlyingIsFun1217 Quote Link to comment Share on other sites More sharing options...
blogit Posted June 3, 2008 Author Share Posted June 3, 2008 The form's on the index page the script is a few folders deep the script im using is phplist i'm just trying to have a little more privacy with it, im thinking maybe just write a function that has the url and insert the php function into the action tag so you can't view it. Not the end of the world with this one, thanks for the replies 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.