Jump to content

chrisbcats

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chrisbcats's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. How to get rid of: The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. I'm using this code to go back to the last page visited [code] <input type=button value="<< Back" onClick="history.go(-2)" /> [/code]
  2. Thank you both! I better understood number_format.
  3. Thanks! I fixed that '|' issue, and the problem I had going on with using different variable names. Regarding the if statement is fixed it using: if(isset($_POST["create"])) { //code to check form } else { show_form(); } I just put the form in a function, and that solved my issue
  4. I'm trying to validate a form before saving the input to MySQL. Here is a sample of what I'm doing. [code] if(isset($_POST["create"])) { if((!$_POST['uname']) | strlen($_POST['fname']) < 2 ) {         $print_again = true;       }      if((!$_POST['passwd']) | strlen($_POST['passwd']) < 3 ) {         $print_again = true;     } if($print_again) { //do nothing } else{ echo('everything is good'); } }[/code] What shold happen is: If the variable is invalid, $print_again is set to true, and nothing changes. But if the variable is valid then a messages appears on the screen. What really happens: After the variable is set to true once it is always true. How can I fix this since this code is in a submit button? I've tried $print_again = false; before the if statements, but then $print_again is always set to false.
  5. How do I format php variables? I have several calculated php variables. How do I format the variables in decimal and whole number format? ex: $netValue = 874.76233 $net = 8952038 I need the variables to return: $netValue = 874.76 $net = 8,952,038
  6. k, that works. Here is my new problem: pow ( base, exp ); PHP cannot handle negative bases. I have a negative exponent. The function returns 0. $netValue = pow(4140000,-3599999.9); How can I comupte a negative exponent?
  7. <?php require 'file_name.php'; ?> <html> <head> <body> ...... <?php function_name(); ?> .........
  8. How do I caculate exponents (powers) in php? Here is my formula: $netValue = ($margin_benefit * (1 + $weightAverage)^(($improvment/365) - $margin_benefit)); I need: [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]($margin_benefit * (1 + $weightAverage) [!--colorc--][/span][!--/colorc--] to be raised to the [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--](($improvment/365) - $margin_benefit))[!--colorc--][/span][!--/colorc--] power
  9. how do I return and assign values in php from mysql?
×
×
  • 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.