Jump to content

Use php file instead of url in form action


blogit

Recommended Posts

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
}
?>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.