Why include the php file inthe first line of the code?? The form submits to that. I see no use of any php functions n the code at all. Simply put there is no reason to include the file
There is a second php start tag below the form tag that has no use I can see remove it.
This block of code:
Code:
<?php
<div>
<fieldset>
<label for="name">
<div align="left">
<table align="center" border="0" cellpadding="4" width="100%">
<div align="center">
<p><span class="style3 style27">Booking Form</span>
<input type="hidden" name="sent" value="1" />
</p>
</div>
<tbody><tr></tr><tbody>
<tr><td align="right" valign="top" class="fieldname style23 style29 style22"> </td>
<td align="left" valign="top" class="style29 style22">* Required Information </td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" class="style3"><p class="style26"><span class="style30">Contact Information</span> </p> </td>
</tr>
<tr>
<td class="fieldname" align="right" valign="top"><span class="required">*</span>Your Name:</td>
<td align="left" valign="top"><input name="strContactName" class="box" size="50" maxlength="50" title=" Please enter your name " type="text"></td>
</tr>
<tr>
<td class="fieldname" align="right" valign="top"><span class="required">*</span>Email Address:</td>
<td align="left" valign="top"><input name="strEmailAddress" class="box" id="strEmailAddress" title=" Please enter a valid email address " size="50" maxlength="50" type="text"></td>
</tr>
<tr>
<td class="fieldname" align="right" valign="top">Telephone:</td>
<td align="left" valign="top"><input name="strTelephone" class="box" size="50" maxlength="50" title=" Please enter your telephone number " type="text"></td>
</tr>
<tr>
<td class="fieldname" align="right" valign="top">Cell Phone:</td>
<td align="left" valign="top"><input name="strAltPhone" class="box" size="50" maxlength="50" title=" Please enter your cell phone number " type="text"></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" class="style30">Tour Information </td>
</tr>
<tr>
<td class="fieldname" align="right" valign="top"><span class="required">*</span> Tour Date:</td><td align="left" valign="top"><input name="strTourDate" class="box" size="50" maxlength="50" title=" Please enter the date you want to go on the tour " type="text"></td><tr>
<td colspan="2" align="left" valign="top" class="style30">Pickup Details </td>
</tr>
<tr>
<td align="right" valign="top">Hotel Name:</td>
<td align="left" valign="top"><input name="strHotelName" class="box" id="strHotelName" title=" Please enter the hotel name " size="50" maxlength="50" type="text"></td>
</tr>
<tr>
<td align="right" valign="top">Hotel Telephone:</td>
<td align="left" valign="top"><input name="strHotelPhone" class="box" id="strHotelPhone" title=" Please enter the hotel telephone number " size="50" maxlength="50" type="text"></td>
</tr>
<tr>
<td align="right" valign="top">Pickup Address:</td>
<td align="left" valign="top"><textarea name="strAddress" cols="50" rows="8" class="box" id="strAddress" title=" Please enter the pickup address "></textarea></td>
</tr>
<tr>
<td colspan="2" class="style30" align="left" valign="top">Queries</td>
</tr>
<tr>
<td align="right" valign="top"></td>
<td align="left" valign="top"><textarea name="strRemarks" cols="50" rows="8" class="box" id="strRemarks" title=" Please enter your comments or remarks "></textarea></td>
</tr>
<tr>
<td colspan="2" class="subheading" align="left" valign="top"><span class="style22 style31">Payment payable in Thai Baht when you join the tour</span><br /></td>
</tr>
<tr>
<td align="right" valign="top"><input name="btnSubmit" id="btnSubmit" value=" Submit " class="button" type="submit"></td>
<td align="left" valign="top"> </td>
</tr>
</div>
</form <<-- INVALID FORM CLOSE TAG!!!!
?>
The form close tag is invalid code. On a page with only one form element this usually doesn't kill a submit but fuckin fix it fer crissake
What the fuck are the php tags doing there anyway?
There is absolutely no reason this file should have ANY php tags in it.
If your server was parsing I wuld nevere see them!!!!!
That being said, in your form opening element the method=" post" remove teh leading space inside the quotes not sure it has any affect be remove it clean up the code.
I'm going start off with I HATE PHP tags emedded n HTML pages! I write all my code as pure html or pure php that echoes (or Prints) html out when the fucntions are called. But this ugly fuckin convention has become the web coders preferred method, the thinking is it's easy. It's a mother fucker to maintain.
But you include the 'a_library/php/bdt_bookings.php' file at the top of the file there are no php functions in the file no variables nor are there any with in the second tags. Again WHY DO I EVEDN FUCKIN SEE THEM IN THE SOURCE????? The parser would remove them and replace with the out put of the functions of files!!!!
That is the Biggie; the server is not set up to parse php in html files. If it was I would not even see the fucking tags. the fact that the php tags show in your code tell me the server is servig the fgile as pure html. Unless you added some slick php coding to present the php tags as strings.
Without a full, unparsed source code I couldn;t tell you what's going on there.
The php parser does not echo the php code as code so I am guessing here but it ain;t being parsed as php. If this is true then no problem becahse there are no php variables of fucntions being called remove them they don;t hurt shit but are unecessary (again assuming I am seeing the full unparsed code).
Now, looking at the form code the form should submit and process as needed. Comment out the entire php file. "a_library/php/bdt_bookings.php"
Just place
/* after the first < ?php tage and */ before the last ? > then before the opening comment tag ( /* ) add this code:
Code:
var_dump($_REQUEST);
print("<br />\n");
foreach($_REQUEST as $key => $value)
{
if(is_array($value))
{
var_dump($value);
}else{
print("$key => $value<br />\n");
}
}
foreach($_FILES as $key => $value)
{
var_dump($value);
}
or put the code in a file of it's own and include it at the top of the target script. comment out the rest. ie." include('nameofcheckfile.php'); " You should get a very basic output of all your form data in a couple of formats. I wrote this form checker a couple years ago and the out put is crude but tells me that my data is being transferred or not.I use it ever goddam day. This should indicate your form is being submitted. If it is then we need to understand what the fuck the target file is doing exactly. maybe it updates a database and returns html or may it doesn;t return the html but expects another function of file to do so. Too complex to work out with out the code.
Ok rambling
maybe a list is better:
It appears that html files are not filtered through the php parser (this a good thing)
if you want html files parsed in this manner set them as htm or phtml files the config the server to parse files with these extension through the php parser ( Ifuckin hat inline php code what fuckin bars to trouble shoot)
If the code is as I see it in my browser's "view source" util (I'm using the firefox webdeveloper addon) THERE IS NO REASON FOR THOSE TAGS TO BE THERE!!!
I've spent only a few minutes looking at this code I hate trouble shooting table laid out pages and usually spend an hour cleaning up the code before I even try. I didn;t do that here.
I may have missed some things but the above stand out like a russian hooker on Loi Kroh.
with a quick look the form should submit even with the bad close tag. I think your problem is what happens with the form data after it hits the processor script.
I've got a a few irons in the fire right now but if you want, PM me We'll exchange emails, you can send me the source code in question and I'll' try to point you i the right direction. Or Like BF said, hire me to fix the form submit, manipulate the data output it as you want and deal with in any manner you wish (automatic email acknowledgment, billing whatever) and it'll work right out the box.