Jump to content

a65

Members
  • Posts

    25
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    India
  • Age
    22

a65's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. still is not working plz have a look at my whole code as u suggested $(document).ready(function(){ //global vars var form = $("#myform"); var cname = $("#company_name"); var cnameInfo = $("#cnameInfo"); cname.on("blur", function() { validateName(this); }); cname.on("keyup", function() { validateName(this); }); function validateName(cname){ if(cname.val().length < 4){ cname.addClass("error"); cnameInfo.text("We want names with more than 3 letters!"); cnameInfo.addClass("error"); return false; } else{ cname.removeClass("error"); cnameInfo.text(""); cnameInfo.removeClass("error"); return true; } } });
  2. this function is not doing any change even using it blur is also not working
  3. Blur is working properly in codeignitor but why not keyup? var form = $("#myform"); var cname = $("#company_name"); var cnameInfo = $("#cnameInfo"); cname.blur(validateName); cname.keyup(validateName); function validateName(){ if(cname.val().length < 4){ cname.addClass("error"); cnameInfo.text("We want names with more than 3 letters!"); cnameInfo.addClass("error"); return false; } else{ cname.removeClass("error"); cnameInfo.text(""); cnameInfo.removeClass("error"); return true; } }
  4. Is that necesary to use sessions in codeIgnitor? as a am not able to see the files using URL which i can see after being logged in.
  5. <div id="logo"><img src="logo.jpg"</div> <div id="login">login page </div> <table> <tr><td >Name</td><td width><input type=text name=myname></td></tr> <tr><td>Age</td><td><input type=text name=myage></td></tr> <tr> <td> </td> <td><input type=submit value=submit> <input name="Reset" type=reset value=Reset></td> </tr> </table> </div> css code is #logo { float:left; width: 50px; height:10px; } #login { width:100%; font:"Courier New", Courier, mono; font_size:50px; height:50px; margin_left:150px; background:blue; margin_top:10px;
  6. why i am getting the above error.. <?php session_start(); /*this is for making payment by user*/ if(isset($_SESSION['sname']) && isset($_SESSION['spassword']) && isset($_SESSION['saccount_type'])) { mysql_connect("localhost","root",""); mysql_select_db("bank_acount"); $query="select * from account"; $result=mysql_query($query) or die(mysql_error()); $row=mysql_fetch_assoc($result); $num=mysql_num_rows($row); echo($query); ?>
  7. again writing the query solved my problem...
  8. now i am getting reset()expects parameter 1 to be array
  9. why i am not able to show the fetched data in both the combobox. it is being shown in only one combobox <tr><td>account from transfer</td><td><select name="accountname"> <?php while($row=mysql_fetch_assoc($result)) { ?> <option value="<?php echo($row['account_name']); ?>"><?php echo($row['account_name']); ?></option> <?php } ?> </select> </td> </tr> <tr><td>account to transfer</td><td><select name="accountname2"> <?php while($row=mysql_fetch_assoc($result)) { ?> <option value="<?php echo($row['account_name']); ?>"><?php echo($row['account_name']); ?></option> <?php } ?> </select> </td></tr>
  10. i am not able to fetch the values from user_info table and the code is <tr><td>username</td><td> <?php while($row=mysql_fetch_assoc($result)) { ?> <select name="myusername"><option value="<?php echo($row['username']); ?>"><?php echo($row['username']); ?></option> <?php } ?> </select></td></tr>
  11. what is the problem in this line. it is not able to fetch values from user_info ? <tr><td>username</td><td> <?php while($row=mysql_fetch_assoc($result)) { ?> <select name="myusername"><option value="<?php echo($row['username']); ?>"><?php echo($row['username']); ?></option> <?php } ?> </select></td></tr>
  12. here i have to insert these values into account after using if(isset($_POST['account_name'])) echo($account_name); still it gives Undefined index: account_name online 34
  13. why i am not getting a combobox againt usename and also it is showing Undefined index: account_name at line 33 <?php session_start(); if(isset($_SESSION['sname'])) { $var1=$_SESSION['sname']; mysql_connect("localhost","root",""); mysql_select_db("bank_acount"); $query="select * from user_info where username='".$var1."'"; $result=mysql_query($query); $row=mysql_fetch_assoc($result); ?> <form method="post" action="admin_control.php"> <table><tr><td>username</td><td> <?php while($row=mysql_fetch_assoc($result)) { ?> <select name="myusername"><option value="<?php echo($row['username']); ?>"><?php echo($row['username']); ?></option> <?php } ?> </select></td></tr> <tr><td>account name</td><td><input type="text" name="account_name"></td></tr> <td><input type=submit name=submit></td><td><input type=reset></td></table> <?php $var2=$_POST['account_name']; $query ="insert into account values('','$var1','$var2')"; $result=mysql_query($query); } else { echo("improper access"); } ?>
  14. i am trying to go to admin_control.php from login.php through session but it is showing the result improper access of page html code is <html><form method="post" action="login.php"> <link type="test/css" rel="stylesheet" href="user_info.css"></style> <body><table border="1px"> <tr><td>username</td><td><input type=text name=myusername></td></tr> <tr><td>password</td><td><input type=password name=mypassword></td> <tr><td>type</td><td><select name=account_type> <option>admin</option> <option>normal</option></select></td></tr> <tr><td><input type=submit name=login></td><td><input type=reset name=reset></td></tr></table></body></html> php code is <?php session_start(); mysql_connect("localhost","root",""); mysql_select_db("bank_acount"); $var1=$_POST['myusername']; $var2=$_POST['mypassword']; $var3=$_POST['account_type']; $query="select * from user_info where username='".$var1."' and password='".$var2."' and account_type='".$var3."'"; $result=mysql_query($query); $row=mysql_fetch_assoc($result); $num=mysql_num_rows($result); $_SESSION['sname']=$row['username']; $_SESSION['spasswword']=$row['password']; $_SESSION['saccount_type']=$row['account_type']; if($num) { if($_SESSION['saccount_type']==admin) header("location:admin_control.php"); else if($var3==normal) { header("location:user_control.php"); } } else { header("location:normal_user_reg.html"); } ?> admin_contro.php is <?php session_start(); if(isset($_SESSION['sname']) && isset($_SESSION['spassword'])&& isset($_SESSION['saccount_type']) ) { mysql_connect("localhost","root",""); mysql_select_db("bank_acount"); $query="select * from user_info"; $result=mysql_query($query); ?> <div align="center"><table width="150px" border="1px"><tr><td bgcolor="red">admin_control</td></tr> <tr><td><a href="add_account.php">add account</a></td></tr> <tr><td><a href="allocate_amount.php">allocate amount</td></tr> <tr><td><a href="make_payment.php"> make payment</a></td></tr> <tr><td><a href="fund_transfer.php"> fund transfer</a></td></tr> <tr><td><a href="set_user_type.php"> set user</a></td></tr> </table></div> <?php } else echo("improper acccess of page"); ?>
×
×
  • 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.