Form sbmit talking to php file

Forum rules
Post Reply
fishnutz
Posts: 2
Joined: Thu Aug 16, 2012 5:31 pm

Form sbmit talking to php file

Post by fishnutz » Thu Aug 16, 2012 5:37 pm

Okay, I am a web noob and very interested in this tool. It is super easy to use - which is why I am sure it is my lack of skill that prevents me from submitting a form to a php file. What I did was create a simple form with one text field (Edit1) and one Submit button. Then I used the Submit button's link properties to link it to the page the form was on (index) and within that page the file that contained my php code ... "welcome" as shown below:

Code: Select all

<html>
<body>

Welcome <?php echo $_POST["Edit1"]; ?>!<br />

</body>
</html> 
When I preview this and or test the upload the submit button shows the value of Edit1 without reference to the welcome.php file. What must I do to get the submit button to find the php file in preview mode and on my web upload? Any help would be greatly appreciated.

fishnutz
Posts: 2
Joined: Thu Aug 16, 2012 5:31 pm

Re: Form sbmit talking to php file

Post by fishnutz » Thu Aug 16, 2012 6:57 pm

So I now know the issue - and can fix it outside of dfm2html. Namely, the form needs to set the following:

Code: Select all

action="welcome.php"
How do you set the "action" of the form to reference another file?

Thanks in advance!

giosafat
Posts: 35
Joined: Sat Apr 09, 2011 4:43 pm

Re: Form sbmit talking to php file

Post by giosafat » Fri Aug 17, 2012 9:21 am

I hope I have understood your needs. Open the window "presets" (I think it is under "tools" menu, I use the Italian menu) then go to the tab "php" (see attachment) and drag the entire form on your page.
As you can see, the form contains a hidden field and a page container; if you click on the second of these pages, you can see the "html objects" (in this case containing php code). Just change the e-mail at the beginning of the code and everything works.
When you'll publish the project, a php page related to your form will be created.
Obviously, you can also add other fields or change the appearance of each.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “English Forum”