Results 1 to 10 of 10

Thread: PHP Programming and Form Mail

  1. #1
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Programming and Form Mail

    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

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by Mr. Useless Web Designer of berjaya-resorts.com
    We are sorry.
    Currently, we are only supporting Microsoft Internet Explorer(IE) & Opera browser.
    Grrrrr... evil non-standard thoughtless hacked-up amateur pages
    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Quote Originally Posted by Mr. Useless Web Designer of berjaya-resorts.com
    We are sorry.
    Currently, we are only supporting Microsoft Internet Explorer(IE) & Opera browser.
    Grrrrr... evil non-standard thoughtless hacked-up amateur pages
    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 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.

    Mike

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Last edited by Twey; 07-29-2005 at 12:28 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Errr... no. I'm not too likely to post this 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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

    Cheers.

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PHP Code:
    <?php function Head($title) { ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title><?=$title?></title>
    </head>
    <body>
    <?php } function Foot() { ?>
    </body>
    </html>
    <? } function succeed($msg) {
    sleep(1);
    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.");
    Foot();
    die();
    } function 
    fail($missing) {
    Head("Error");
    ?>

    An error has occurred.  Please fill in the following fields:
    <?=$missing?>

    <?php
    Foot
    ();
    }

    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.";
    succeed($msg);

    } 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"/>
    </form>
    <?php Foot() } ?>
    I haven't tested it, it's too early in the morning, so there are probably bugs. Tweak it as necessary.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey

    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.

    Japhlee

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •