View Full Version : PHP Programming and Form Mail

07-28-2005, 09:03 AM
I am currently doing a project and have found a very interesting site that have a combo if java scripts, form mail and URL links. The problem is that I don't have the skills to come out with the solution.

Please visit: http://www.berjaya-resorts.com/ and then click on any package available. Then try to fill up the necessary. Upon submit, you will get a return form in which you can print. I wanted to post jpg file but you will unable to see the current coding inside the page. (Since the page is right-click protected, you can 'Save As' into your computer and the reopen from there. By doing so, you will download the javascripts)

I found this quite interesting for my project. BUT..... since I have no PHP programming knowledge, I need the assistance of any kind soul willing to give the answers for this type of uses. It is used specially for the travel industry. Not sure if shopping 'cart solutions' are able to do the same function.

All I need is to have a page to book, the 'converting scripts' with a return form to acknowledge the booking.

Kind souls are welcome.. you may email to japhlee@hotmail.com


07-29-2005, 12:19 PM
We are sorry.
Currently, we are only supporting Microsoft Internet Explorer(IE) & Opera browser.Grrrrr... evil non-standard thoughtless hacked-up amateur pages :mad:
They've even failed to set the background colour on that page, so I can still see my light-green background and the white-background image looks rubbish.

Bah... spoofed user-agent didn't fool 'em. :(

07-29-2005, 12:42 PM
We are sorry.
Currently, we are only supporting Microsoft Internet Explorer(IE) & Opera browser.Grrrrr... evil non-standard thoughtless hacked-up amateur pages :mad:I think you'll find that that's a third-party service, but stays under the berjaya-resorts.com domain because of the cloaking frame (berjaya-resorts.com is actually a GeoCities account). Still, your point is valid: the 'developer' of that service is an amateur that can't write code for toffee. I don't see any reason to restrict the supported browsers, except for cluelessness.

Bah... spoofed user-agent didn't fool 'em. :(Did for me using the User Agent Switcher (http://chrispederick.com/work/firefox/useragentswitcher/) extension (0.6.6).

To the OP: don't place your Terms and Conditions, or your FAQ in a dialogue box. Not only will that content be unreadable for users without client-side script support, but it's not even readable for most users as the box will extend beyond their monitor dimensions. For users that don't know how to dismiss dialogue boxes with the keyboard, you're leaving them in a position where they cannot use their browser any more.


07-29-2005, 01:21 PM
I was using Modify Headers. Maybe I misspelt the IE user-agent string.

/EDIT: Apparently it checks the appname. Works with user-agent switcher.

Firefox crashed when I clicked to view the agreement.

08-05-2005, 03:04 AM
I presume that Twey must be the originator of this script through his statement.

As the originator, what advise can you give for someone who wanted to develop a simple solution. Couldn't understand what you mean by "Currently, we are only supporting Microsoft Internet Explorer(IE) & Opera browser."

Please explain. TQ.

08-05-2005, 12:32 PM
Errr... no. I'm not too likely to post this (http://www.dynamicdrive.com/forums/showpost.php?p=14027&postcount=2) about myself, now am I. When I make a site, if it doesn't look readable in every browser I possess (which is quite a few, a lot of them text-only) I fix it. I would never limit my page's viewers, even if this meant cutting off some features.

08-06-2005, 03:09 AM
Well, looks like I hit a brick!. Any tips on how or where to get a solution such as the originally posted. Need to complete my project.

Any good soul out there have any tips to share?


08-06-2005, 08:04 AM
<?php function Head($title) { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php } function Foot() { ?>
<? } function succeed($msg) {
mail("japhlee@hotmail.com", "New Booking", $msg, "Content-Type: text/plain\r\n\r\n");
Head("Mail sent.");
echo("Your request has been successfully sent.");
} function fail($missing) {

An error has occurred. Please fill in the following fields:


if($_POST['name']) {
$missing = "<ul>";
$name = $_POST['name'];
$date = $_POST['date'];
$address = $_POST['address'];

if(!isset($name)) $missing .= "<li>Name</li>";
if(!isset($date)) $missing .= "<li>Date</li>";
if(!isset($address)) $missing .= "<li>Address</li>";

$missing .= "</ul>";
if($missing == "<ul>") {

$msg = "A new booking has arrived from $name at $address on $date.\n\tThanks,\n\t\tYour friendly form mail script.";

} else fail($missing);

<?php } } else { Head("Request a Booking"); ?>
<form action="<?=$PHP_SELF?>" method="post">
Name: <input type="text" name="name"/><br/>
Date: <input type="text" name="date"/><br/>
Address: <textarea rows="3" cols="20" name="address"></textarea><br/>
<input type="submit" value="Submit Request"/>
<?php Foot() } ?>
I haven't tested it, it's too early in the morning, so there are probably bugs. Tweak it as necessary.

08-12-2005, 12:15 PM

Thought that I have already reply to your posting!!????..... Somehow, It did not get posted.
Anyway, just to say a Thanks.

Although, I haven't got done yet.. I sure get some idea how it works. Cheers.


08-12-2005, 01:27 PM
Ah, I'm glad it's not just me.
ddadmin: this seems to be a bug. Several times I swear I've clicked the submit button, but the post just doesn't go.