i want to check that my ID already exist in my db or not.
I cannot complete my pages. Please help.

user side script
PHP Code:
    sql "Select * FROM usrtbl Where myID='" Text1 "'"
        
path "http://localhost/name.php?sql="
        
myPath path sql 
I want to sent this query to my server side script page. That is
PHP Code:
<?php 
$host
="localhost"
$user="root"
$db="ant"
$link=mysql_connect($host,$user) or die ("Couldnot connect".mysql_error()); 
if (
$link) { 
    
mysql_select_db($db) or die ("Couldn't".mysql_error()); 
    } 
    
$result=mysql_query('sql'); 

    
$num_rows=mysql_num_rows($result); 
    if (
$num_rows 0
    { 
    print
"1"
    }else{ 
    print
"0"
    } 
?>
Do anybody Please Correct these both script.
(Please don't change this idea : I want to make the total sql from user page then process it to server side page)