Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Zane

  1. If you haven't grasped the idea completely yet...here's a visual

    [size=14pt][color=red]questions table[/color][/size]
    [code]q_id    q_body                                                q_answer
      0    "What is 2 + 2?"                                            2
      1    "Who was the first president of the US?"                    4
      2    "Who founded Microsoft?"                                    3
      3    "What is PHP?"                                              1
      4    "What year is it?"                                          0[/code]

    [color=red][size=14pt]answers table[/size][/color]
    [code]a_id    a_body                                               
      0    "2006"
      1    "Hypertext Preprocessor"
      2    "4"
      3    "Bill Gates"
      4    "George Washington"[/code]

    Then when setting up your test it's a matter of matching which quesitons you want for it
  2. why would there be non-existent functions called if you didn't mispell/misname them yourself?

    I guess I'm just asking for a little more in depth scenario.
    you say and error is returned and that only happens when the coder makes and error...most of the time

    so I'm guessing you're trying to allow open source something


    EDIT:
    nevermind
    I got beat

    Very interesting article BTW...I feel so inspired now
  3. this should do it
    [code]if(ereg("[^A-Za-z0-9_-]+", $var)[/code]

    been out of practice of regex for a while

    [quote]
    Ok, reviewing this code, you have missing curly brackets.
    [/quote]

    notice his IF statements only have one statement...
    When your IF statements only do one thing...you don't need curly braces
  4. There are two ways to handle credit card transaction from what I've read over the few years.

    you can either use paypal, have it redirected there, and be charged like 1% for that service

    or you can get a HTTPS license for your site
    then you can send credit card info through your site worry free because it's already encrypted, but that costs you quite a bit.

    check out sites like VeriSign to research that.
    If you do it with paypal, you're drawback is that you have to use they're layout for a .... shopping cart - per say.
  5. [quote]you sure ARE NOT executing php from within an onmouseover.[/quote]

    I agree...and it if you are it's defintely AJAX
    if it's not AJAX what you're doing could be done by at least
    PHPing, so to speak, the SWF filename as a parameter to your javascript function, that takes an SWF file as an argument.

    so like
    [code]onmouseover='showMovie(<? echo $swfFile; ?>)'[/code]
  6. [code]  $loginFoundUser = mysql_num_rows($Login);
    if ($loginFoundUser){
    setcookie('Logged', 'True', time()+60*60);
    header('Location: index.php');
    exit;
    }else{
      $errorMessage = true;
    }[/code]

    [quote=php.net/mysql_num_rows]
    mysql_num_rows return the number of rows in a result set on success, or FALSE on failure.
    [/quote]

    $loginFoundUser will only be false if the SQL statement has an error in it..
    you'll have change you if statement to

    [code]if ($loginFoundUser == 1{[/code]
  7. hate to consider completely changing the code but this should work a little better and be less redundant


    [code]$message = null;
    $tmp = null;

    foreach($_POST as $index=>$value) {
      if($index == "username" && empty($val))
            $message .= "You did not complete the username field properly.<br>\n";

      if(($index == "password" && empty($val)) || ($index == "confirmPass" && empty($val)))
            $message .= "You did not enter a correct password.<br>\n";
      else if($index == "password" && !empty($val))
            $tmp = $val;


      if($index == "confirmPass" && $val == $tmp)
            $message .= "Your password entries did not match.<br>\n";
    }
    echo $message;[/code]
  8. lol...I got one.
    just for the reason that all my friends have it.  I can't quite figure out why it's so popular either, it is kinda overated.

    I got facebook as well...but it's turning into this stalker news feed thing.  About tells everyone everytime you fart.

    either one, I'll never get used to posting a blog about my life, which is all MySpace is.  Blogs........and gossip, and chain letters..bleh
  9. right here
    [quote]    // if a session does not exist but the form has been submitted
        // check to see if the form has all required values
        // create a new session
        if (empty($_POST['user'][b][color=red][size=12pt])[/size][/color][/b]) && [b][color=red][size=12pt]{[/size][/color][/b]empty($_POST['pass'])) {[/quote]

    get rid of the two characters marked in red
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.