I am running a local wordpress install on a windows 7 machine. I used web platform installer to install it and it is running off IIS.
I needed to use a custom form from a php file that I am using that works on other websites. I migrated it over to wordpress by creating a custom page template and including the php code into it.
But whenever I attempt to request the page I get an internal server error which I can blame on the require_once line.. Please note that the fgcontactform.php also calls require_once.
Can anyone help, the php code is below
<?php
/**
* The template for displaying all pages.
*/
require_once("./include/fgcontactform.php");
require_once("./include/simple-captcha.php");
get_header('general'); ?>
<div class="shell">
<div class="main">
<section class="post">
<img src="css/images/post-img.png" alt=""/>
<!-- Form Code Start -->
<form id='contactus' action="webformmailer.php" method='post' accept-charset='UTF-8'>
<fieldset >
<legend></legend>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />
<div class='short_explanation'>* required fields</div>
<div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
<div class='container'>
<label for='name' >Your Full Name*: </label><br/>
<input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
<span id='contactus_name_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='email' >Email Address*:</label><br/>
<input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
<span id='contactus_email_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='website' >Website (e.g www.example.com)*:</label><br/>
<input type='text' name='website' id='website' value='<?php echo $formproc->SafeDisplay('website') ?>' maxlength="150" /><br/>
<span id='contactus_website_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='phone' >Phone Number*:</label><br/>
<input type='text' name='phone' id='phone' value='<?php echo $formproc->SafeDisplay('phone') ?>' maxlength="15" /><br/>
<span id='contactus_phone_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='message' >Message:</label><br/>
<span id='contactus_message_errorloc' class='error'></span>
<textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
</div>
<fieldset id='antispam'>
<legend >Anti-spam question</legend>
<span class='short_explanation'>(Please answer the simple question below. This to prevent spam bots from submitting this form)</span>
<div class='container'>
<label for='scaptcha' ><?php echo $sim_captcha->GetSimpleCaptcha(); ?></label>
<input type='text' name='scaptcha' id='scaptcha' maxlength="10" /><br/>
<span id='contactus_scaptcha_errorloc' class='error'></span>
</div>
</fieldset>
<div class='container'>
<input type='submit' name='Submit' value='Send' />
</div>
</fieldset>
</form>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->
<script type='text/javascript'>
// <![CDATA[
var frmvalidator = new Validator("contactus");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("name","req","Please provide your name");
frmvalidator.addValidation("email","req","Please provide your email address");
frmvalidator.addValidation("email","email","Please provide a valid email address");
frmvalidator.addValidation("website","req","Please provide your Website");
frmvalidator.addValidation("phone","req","Please provide your phone number");
frmvalidator.addValidation("phone","num","Please provide a valid phone number");
frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");
frmvalidator.addValidation("scaptcha","req","Please answer the anti-spam question");
// ]]>
</script>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>