jjmusicpro Posted July 12, 2007 Share Posted July 12, 2007 I cant seem to get this working right, it just redirects to itself. I wanted it to go to the thankyoupage. echo "<b>No locations found for your zip.</b><br>Please fill out the form below so we can help your further.<p>"; echo "<fieldset><form method=\"POST\" action=\"http://fp1.formmail.com/cgi-bin/fm192\"> <input type=\"hidden\" name=\"redirect\" value=\"http://www.mysite/thankyou.html\"> First Name:<input type=\"text\" name=\"Customer_First_Name\"><br>Last Name:<input type=\"text\" name=\"Customer_Last_Name\"><br><input type=\"submit\" value=\"Submit your Information\"></form> </fieldset>"; Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 12, 2007 Share Posted July 12, 2007 where is the header file and where is the form going like the form submit Quote Link to comment Share on other sites More sharing options...
jjmusicpro Posted July 12, 2007 Author Share Posted July 12, 2007 This was just a piece of code in a if/else statment. Cant i include the <form> here some thing </form> inside the echo statment? I only wanted this data to display if no zip codes were found. everything works fine except this Quote Link to comment Share on other sites More sharing options...
bubblybabs Posted July 12, 2007 Share Posted July 12, 2007 The code could be made easier to read by using single quotes: echo '<fieldset><form method="POST" action="http://fp1.formmail.com/cgi-bin/fm192"> <input type="hidden" name="redirect" value="http://www.mysite/thankyou.html"> First Name:<input type="text" name="Customer_First_Name"> <br>Last Name:<input type="text" name="Customer_Last_Name"> <br><input type="submit" value="Submit your Information"></form> </fieldset>'; By using the single quotes on the outside instead of double quotes you shouldn't have to escape all of the double quotes contained within... Just wanted to mention that... Babs Quote Link to comment Share on other sites More sharing options...
jjmusicpro Posted July 12, 2007 Author Share Posted July 12, 2007 The code could be made easier to read by using single quotes: echo '<fieldset><form method="POST" action="http://fp1.formmail.com/cgi-bin/fm192"> <input type="hidden" name="redirect" value="http://www.mysite/thankyou.html"> First Name:<input type="text" name="Customer_First_Name"> <br>Last Name:<input type="text" name="Customer_Last_Name"> <br><input type="submit" value="Submit your Information"></form> </fieldset>'; By using the single quotes on the outside instead of double quotes you shouldn't have to escape all of the double quotes contained within... Just wanted to mention that... Babs For some reason when i just put what i have, and click submit, it just goes back to index.html. It shoul dbe going to thankyou.html Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 12, 2007 Share Posted July 12, 2007 change the actionn to action="yourpage.html" Quote Link to comment Share on other sites More sharing options...
bubblybabs Posted July 12, 2007 Share Posted July 12, 2007 change the actionn to action="yourpage.html" I have a feeling he needs the fp1.formmail.com program to complete the coding... Babs Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 12, 2007 Share Posted July 12, 2007 to redirect heres how header('location: http://www.mysite/thankyou.html'); 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.