I am new to Google App engine, so stuck. I want to run a php script to process my form in google app engine. I am not sure how to go about it.
This is how I have defined the form:
<form method="post" action="/php/" name="SampleForm">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" />
<input id="TEST" type="text" name ="EmailAddr" class="text" value="Your email address" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Your email address';}">
<input type="hidden" name="subject" value="Sample FormMail Testing" />
<input type="hidden" name="recipients" value="helloworld@gmail.com" />
<input type="submit" value="Submit" />
</form>
and this is my app.yaml :
application: totemic-gravity-676
version: 1
runtime: php
api_version: 1
handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
static_files: \1
upload: (.*\.(gif|png|jpg|ico|js|css))
- url: /robots.txt
static_files: robots.txt
upload: robots.txt
- url: /
script: main.php
- url: /php/
script: formmail.php
what my php script does is that it sends a mail to some email address. I have my formmail.php in the same level as app.yaml. But this does not work. The script can be accessed statically, but when I run it via the form, I get error messages. What could be the problem ?
you may check it in action here :http://totemic-gravity-676.appspot.com/ (scroll down to the update form)
I think I have do something with the -static keyword in my yaml, but I am clueless about how to define a folder as static