Results 1 to 3 of 3

Thread: php mysql query

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    185

    php mysql query

    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)

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: php mysql query

    1) Please limit the number of same topic threads to one...
    2) This is already being discussed in your other thread.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: php mysql query

    Thread closed as duplicate of 485032

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width