Need Help: Tch No Formmail? Php Forms? How?

edited<!--content-->
For php you should visit <!-- w --><a class="postlink" href="http://www.php.net">www.php.net</a><!-- w --> and <!-- w --><a class="postlink" href="http://www.phpfreaks.com">www.phpfreaks.com</a><!-- w --><br /><br />On these two site's you should be able to find everything you need to create these forms and their controling structures.<br /><br />It's a start <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Welcome to the TCH family.<br />My fav php mail form is <a href="http://www.phorm.com/jr.php3" target="_blank">phormjr</a><br />I have a humble demo site for it, <a href="http://csb.thepetscorner.com/forms/" target="_blank">here</a>.<br />there are many others, and Surefire has a very flexiable one, see this <a href="http://www.totalchoicehosting.com/forums/index.php?showtopic=2912&st=0&#entry18794" target="_blank">thread</a><!--content-->
Hi,<br /><br />Looking at the forms you have on your pages, then the code by Surefire should work well.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->1.) Do PHP forms require a "bin" like CGI files do?<!--QuoteEnd--></div><!--QuoteEEnd-->The html for a form looks very similar whether you are using cgi or php to do the "action" bit. The php code sits on the server, and can sit in whatever folder you like - I set up a "scripts" folder which is like the cgi "bin" but you don't have to.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->2.) Does one have to do some special coding for things that go on the host side as well as generate the code for the form that I design in Dreamweaver formy htm pages.<!--QuoteEnd--></div><!--QuoteEEnd--><br />Yes, basically the php is the code that goes on the host side, which you link to from your html in Dreamweaver. Dreamweaever handles php very well in my opinion.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->3.) Will the new pages I create using the PHP script have to end in.php? If so, can anyone with any web browser access and interact with these pages?<!--QuoteEnd--></div><!--QuoteEEnd-->The html page with the form on it can still be html. The code which is the script will need to be .php. The code is run on the server, and it then generates html for the browser, so it is compatibale with any browser. <br /><br />In your current html you will need to change the line <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->action="http://www.indiemanagers.com/cgi-bin/FormMail.pl"><!--QuoteEnd--></div><!--QuoteEEnd--> to point to the php file and you will not need most of the "hidden" fields.<br /><br />I hope that helps, keep asking the questions as you go through each step <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br />Andy<br /><br />Ask away with questions<!--content-->
It is trying to get the document from a directory called form. If you have all your form-mail documents in the same directory then you can delete "/form" and leave the mailit.php like this:<br /><br /><form action="mailit.php" method="post" enctype="multipart/form-data" name="form1"><br /><br />Hope that helps...<!--content-->
webgyrl<br /><br />In your php file you have the check that it is your site, and you have the IP address as '66.11.164.208' which needs changing to '64.246.56.60' otherwise the script is trying to protect you from your site being used to send spam, sucessfully <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> and hence stopping you sending any mail <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> .<br /><br />Once you have correct that error, the next one is the file which you redirect to (after filling in the form) is <a href="http://www.indiemanagers.com/membership_pay.htm" target="_blank">http://www.indiemanagers.com/membership_pay.htm</a> which doesn't seem to exist.<br /><br />Change that though and I think it will be getting close <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br />Andy<!--content-->
I downloaded the form script set everything up and tried it. Got the Thank You page,notified by email,Thank you for submitting to other email. Everything works.<br />So, only one question. Where does it send the uploaded file?<br /><br />curtis<!--content-->
Never mind,Got it. Great script. I'm just learning PHP and the detailed instructions were a great help.<br /> Thanks Thumbs Up <br /><br />curtis<!--content-->
I see my script is getting some use and some good reviews.<br /><br />I found a small bug (most of you will not encounter difficulties) and I'll fix it as soon as I'm back from the 4th of July.<!--content-->
My first instinct was to agree that it was an issue of propagation. The problem is I could see your site fine and was getting the same error when trying to access the manual.<br /><br />Your Dreamweaver set up is also fine so I knew that couldn't be the problem.<br /><br />I did a little experimenting and found that if I created a directory called /manual on my site I got the same error. In looking around a bit more I found that he reason is that /manual is an Alias that will go to the Apache documentation. You will get the same problem if you have a folder called /icons since that is another Alias used by the system.<br /><br />There are a couple of solutions. One is to create a subdomain called manual. You will then be able to access the file by using manual.indiemanagers.com/manual.php (but will still get an error if you use <!-- w --><a class="postlink" href="http://www.indiemanager.com/manual/manual.php">www.indiemanager.com/manual/manual.php</a><!-- w -->.)<br /><br />The other, and easier, option is to rename the folder. You could call it manuals or mymanual or anything else and it will work fine as well.<!--content-->
webgyrl,<br /><br />Glad you got it all sorted - it works fine from here now <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Andy<!--content-->
Opps, you spotted my post before I had read page 2 and edited it - opps <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br />The IP address you have as '66.11.164.208' which needs changing to '64.246.56.60'.<br /><br />Andy<!--content-->
 
Back
Top