Recent content by Peter2

  1. P

    Trouble in mysql_num_rows() in php

    Thank you all for the great help. From your reply, I found two mistakes: 1. In the $SQL statement, the variable $userid should be in single quotes as jjones indicated. 2. As indicated by Klin, you have to reference the sql connection object within the mysql_query function. Now my...
  2. P

    Trouble in mysql_num_rows() in php

    Hi; PHP experts: In the last part of my project I run into a trouble in using mysql_num_rows() function, I want to use this function to check if the userID entered by the new user is already taken in the database. Here is the code: $user_name = "root"; $pass_word = ""; $database =...
  3. P

    php script for variables attached to url

    Than you all for very nice help. I followed your suggestion, and my code works now. Thanks again. Peter
  4. P

    php script for variables attached to url

    Hi; I use the $_GET to get the values of variables attached to url like this: http://www.abc.com/mypage.php?var1=abc in the mypage.php, I use $var1=$_GET['var1']; But it will give an error message when there is no variable attached to the url like...