By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,783 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

code for search method

P: 12
hi,
i need some help in the search code which i am sending you
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. $con=mysql_connect("localhost","root","");
  4. mysql_select_db("school",$con);
  5.  
  6. if(isset($_POST['search']))
  7. {
  8. $uname=$_POST['uname'];
  9.  
  10. $sql=mysql_query("select * from cpass where uname ='$uname'");
  11. while($res=mysql_fetch_array($sql))
  12. {
  13.  
  14. echo "the search successfull";
  15. echo $res['uname'];
  16. //echo $sql;
  17. }
  18. }
  19.  
  20. ?>
  21.  
i think it is ok but i dont know y its not working
plz tell me how could i work it out
Jul 31 '07 #1
Share this Question
Share on Google+
3 Replies


pbmods
Expert 5K+
P: 5,821
Heya, Sree.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

What do you want your code to do? Give an example.
What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Jul 31 '07 #2

P: 12
ya i have got the solution for the query i have posted you and i need some information like i need code for no of user visiting the site..
where can i get the code..
i mean any website...
Jul 31 '07 #3

pbmods
Expert 5K+
P: 5,821
Heya, Sree.

What do you want your code to do? Give an example.
Jul 31 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.