Post form code - it won't work

Discussion in 'PHP' started by lokielookies, Oct 6, 2007.

  1. #1
    Hi

    Let me start by saying I'm an absolute PHP beginner.
    I was experimenting with a simple POST script, but when I try to submit a form code (like an autoresponder form), on the result page lots of // are added.

    The code looks like this:

    <center>  <h2>This Is The Title </h2>
    <br /><br />
       <p><center><form method=\"post\" action=\"http://www.aweber.com/scripts/addlead.pl\">
    <input type=\"hidden\" name=\"meta_web_form_id\" value=\"********\">
    <input type=\"hidden\" name=\"meta_split_id\" value=\"\">
    <input type=\"hidden\" name=\"unit\" value=\"ultimateebaykit\">
    <input type=\"hidden\" name=\"redirect\" value=\"http://www.********.net/******\">
    <input type=\"hidden\" name=\"meta_redirect_onlist\" value=\"\">
    <input type=\"hidden\" name=\"meta_adtracking\" value=\"\">
    <input type=\"hidden\" name=\"meta_message\" value=\"1\">
    <input type=\"hidden\" name=\"meta_required\" value=\"from\">
    <input type=\"hidden\" name=\"meta_forward_vars\" value=\"0\">
    <table>
    <tr><td colspan=2><center></center></td></tr>
    <tr><td>Name:</td><td><input type=\"text\" name=\"name\" value=\"\" size=\"20\"></td></tr>
    <tr><td>Email:</td><td><input type=\"text\" name=\"from\" value=\"\" size=\"20\"></td></tr>
    <tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Submit\"></td></tr>
    </table>
    </form></center>
     <p></p>
    
      
    Code (markup):

    Is there a way to avoid this?

    Greetz!
    Mieke
     
    lokielookies, Oct 6, 2007 IP
  2. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #2
    You must disable magic quotes on your php.ini file

    the default value when you install PHP is :
    magic_quotes_gpc = On

    so you have to turn it off:
    magic_quotes_gpc = Off
     
    nabil_kadimi, Oct 6, 2007 IP
  3. roosevelt

    roosevelt Active Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    If you don't have access to php.ini file and have apache server. Then you can use .htaccess to do the same.

    make a .htaccess file under your website's root folder and add the following codes:

    php_value magic_quotes_gpc = On
    Code (markup):
    if you wish to turn it off, simply change On to Off.
     
    roosevelt, Oct 6, 2007 IP