/    Sign up×
Community /Pin to ProfileBookmark

verify password script

i’ve created an order.php page and would like to know if someone can help with several scripts:

  • 1. how to add script to verify 2 password text fields.

  • 2. how to add script to ensure that checkbox fields are checked by the user.

  • 3. how to add script so when user submits the form, the user account info such as user id and password are emailed to the user.
  • you can look at what i have so far at:

    [url]http://www.bradhopwood.com/ironlogo/order.php[/url]

    to post a comment
    PHP

    3 Comments(s)

    Copy linkTweet thisAlerts:
    @webgovernorApr 15.2005 — Well, ok... here's some password info

    [CODE]<?php

    $pass = $_POST['pass'];
    $pass2 = $_POST['pass2'];
    $checkBox1 = $_POST['checkBox1'];

    //Auth script, must equal certian number to authorize
    $auth = 0;

    //Error array script, push errors
    $errors = Array("Errors");

    //Check to see if passwords match
    if ($pass == $pass2) {
    $auth = $auth + 1;
    }
    else {
    array_push($errors, "Passwords do not match.");
    }

    //Checkbox scripted
    if ($checkBox1 == "the value") {
    $auth = $auth + 1;
    }
    else {
    array_push($errors, "CheckBox not checked.");
    }

    //If authorized.
    if ($auth == "2") {
    $to = "[email protected]";
    $from = "From: " . $usersEmail;
    $subject = "Form Data";
    $body = "Page body goes here...";

    $mailed = mail($to, $subject, $body, $from);

    //If script was mailed
    if (!$mailed) {
    echo "Mail ERROR, could not send mail";
    }
    }
    else {
    echo "Below are some errors...<br />";
    echo $errors;
    }

    ?>[/CODE]


    That's just some off the top of my head.

    If I where you, I'd just google around for some tutorials,

    they're everywhere, lots of them.

    And the above is REALLY common and simple stuff, so

    you should be able to find it everywhere.

    You'd get the info you want a lot sooner then if you

    post all that here.

    Oh, and you're welcome...

    Good Luck!
    Copy linkTweet thisAlerts:
    @bokehApr 15.2005 — You need to check [URL=http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bradhopwood.com%2Fironlogo%2Forder.php]your html mark up[/URL] with a validator. And having gone to the trouble of having a stylesheet why not use it for your layout instead of those tables?
    Copy linkTweet thisAlerts:
    @webgovernorApr 15.2005 — You need to check your html mark up with a validator. And having gone to the trouble of having a stylesheet why not use it for your layout instead of those tables?[/QUOTE]

    I agree, my head hurts after looking at that source.

    At least the tables are organized, but jeeze!
    ×

    Success!

    Help @explorerL spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...