1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Best Language for this?

Discussion in 'Software Development' started by jkhdesigns, Apr 17, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. jkhdesigns

    jkhdesigns Thread Starter

    Joined:
    Apr 17, 2008
    Messages:
    10
    Hello,

    I am not a programmer, but have written a lot of programs in my life time, using Pascal,C, Delphi and a complete accounts receivable program in (Pal) Paradox application language but this was over 15 years ago. I have built several simple web sites but now I am trying to build a password protected web site that will allow a user to log in and then have a form to send information back to me by e-mail. I have all the pages and forms built in Dreamweaver and HTML and have all the fields validated by learning a little about Javascript. I have been able to get mailto to open outlook and receive one line of the form data but no more, I have about 12 fields that I need sent back. I know that this is not a very secure way of doing this, but its not a high security money transaction site. I am using Windows 2000 and am only a single user not on a server system. I don't know anything about Unix or Linux OS's. I also need something that hopefully is low budget, don't mind buying a book or something if I need to. Do I need PHP, Ajax,CGI, Perl or what other language do you recommend?
     
  2. TheRobatron

    TheRobatron

    Joined:
    Oct 25, 2007
    Messages:
    551
    You can do this pretty easily with PHP. If there are many users I'd recommend putting their user names in a MySQL database, but if there are only a couple you can save time by hardcoding them into the script with a simple if statement. You said you validated the forms using javascript - do you mean you use JS to log people in? You have to remember that it's a client-side language and so can be seen and manipulated by the user (and so is not secure in any way). To make it even remotely secure you need to validate it server-side. For mailing, I would avoid using the mailto: command, because it only works on some platforms and some people (including me) don't use Outlook. Instead, use the PHP mail() command and an HTML form. This is simple to use:

    bool mail($to, $subject, $message, [addtional headers]).

    There are plenty of free tutorials on the web for PHP, but if you want to buy a book, I found (and still find) PHP and MySQL for Dummies very useful. Also see www.php.net for the complete documentation.

    HTH
     
  3. jkhdesigns

    jkhdesigns Thread Starter

    Joined:
    Apr 17, 2008
    Messages:
    10
    TheRobatron,
    Thanks for the reply, I am looking at Hot Scripts. Do any of you know anything about this Apache2Triad? Supposed to be a open source combo package that runs on the Windows platform with Apache server, PHP, XMail, MySQL and several others, just wondered if it is going to be more complicated than I really need? The download is only 97 mgb. I know the developers have to keep this stuff complicated to keep some of the spammers and hackers away, but this seems like a lot to go through for a registration web site and private passage into a web site. I am guessing that this would inmate running on a server on my single PC and allow me to test though my browser any PHP scripts that I might find or stumble into making and still be able to use parts of the Javascript that is not security sensative. Is this correct?
     
  4. TheRobatron

    TheRobatron

    Joined:
    Oct 25, 2007
    Messages:
    551
    If all you want is a simple login to access a form, you don't really need a complicated script to handle logins. All you need is an if statement:
    PHP:
    $username $_REQUEST['username'];
    $password $_REQUEST['password'];

    // Request the mailing form fields
    $field1 $_REQUEST['field'];

    if (
    $username == "someuser" && $password == "somepass")  {

    // Choose any field that will be sent
    if (!isset($field1)) {


    echo 
    "<form action='".php_self()."'>
    <input type='hidden' value='
    $usename' name='username' />
    <input type='hidden' value='
    $password' name='password' />
    <!-- Form for stuff you want to mail -->
    ....
    </form>"
    ;

    } else {

    mail($to$subject$message"From: [email protected]");

    }
    }
    I think that code should work. :)

    Also remember that you need a login form pointing to that page.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Best Language
  1. Joe Hudson
    Replies:
    4
    Views:
    756
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/704788

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice