Hi I'm trying to upgrade a static html site to drupal. I am having trouble copying this php form to drupal. I went to create content and selected PHP code and just copied and paste this page.

http://chinatownicecreamfactory.com/employment.php

Everything shows up, but when i click on the submit button under drupal nothing happens. Its as if the php never gets run.

What am i doing wrong here? My code is below:

< ?
if ($action == "Send")
{
$message_body = "the body of the message....";

if(empty($name) OR empty($email) OR empty($address) OR empty($age)) {
echo "Please go back and fill in all the information.


<-- Go Back";
die();
}
elseif(!strstr($email,"@") || !strstr($email,".")) {
echo "Please enter a valid email address.


<-- Go Back";
die();
}
else {
mail("", "Employment Application", "$message_body","From: $name <$email>");
echo "Your message has been submitted!


Return to Chinatown Ice Cream Factory";
die();
}
}
?

Thanks,
Pat

Comments

yelvington’s picture

patoshi’s picture

awesome.. exactly what i was looking for... i had a hard time finding info on the forum about this. There should have been more keywords related to this topic as this feature request would be quite common.

php custom code questionaire questions

Any idea of how I would do this in drupal:

http://www.chinatownicecreamfactory.com/presskit.html

Its basically a video and image gallery combined. Is there a module for this type of gallery with images and videos combined? Actually its more like links to the videos.

Thanks alot!!!!!!!