Jump to content

isee

Members
  • Posts

    3
  • Joined

  • Last visited

isee's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. isee

    Help fixing this

    @dsonesuk Thank you for that i have already implemented that but for some reason when i try to login it doesn't login but display this error <?php $error = $_GET["error"]; if ($error == "wrong") { echo "Wrong Username and Password entered. Please try again!"; } else if ($error == "nouser") { echo "You are trying to access a secured page. Please provide your Username and Password to continue."; } else { echo "Please login to proceed."; } ?> The above php code is in the login page.
  2. isee

    Help fixing this

    PHP Fatal error: Call to undefined function session_register() - From error log this is for a login page. $mode = $_GET['mode']; $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $encrypted_mypassword=md5($mypassword); $result = mysql_query("SELECT * FROM user WHERE username='" . $myusername . "' and password='" . $encrypted_mypassword . "'",$db); if(!$result) { echo mysql_error(); } else { $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count == 1) { $row = mysql_fetch_assoc($result); // Register $myusername, $mypassword session_register("myusername"); session_register("mypassword"); $_SESSION['user_id'] = $row['username']; $_SESSION['user_type'] = $row['usertype']; $_SESSION['logged_in'] = TRUE; header("location:index.php?level=1"); } else { if($mode == "new") { header("location:../beta2/AdvisorLogin.php?error=wrong"); } else { header("location:login.php?error=wrong"); } } } I believe this is because of php version any advise on changing the code to work with newer versions ?
  3. Im trying to create a form with JS/html . Please look at image as an example of the mechanism .So far i got this and all it does is add up stuff..<html><head><script language="javascript">function AddInputs(){var total = 0;var coll = document.getElementsByTagName("input")for ( var i = 0; i<coll.length; i++){var ele = coll;total += parseInt(ele.value);}var Display = document.getElementById("Display");Display.innerHTML = total;}</script></head><body><input onkeyup="AddInputs()" /><input onkeyup="AddInputs()" /><input onkeyup="AddInputs()" /><span id="Display" style="float:right;background:red;"></span></body></html>So i need help if someone knows how to allow quantity multiplication :S and even with adding this is basically like a form that allows people to just input some numbers and quantity to see a subtotal NO this is not for ecommerce .
×
×
  • Create New...