• Resolved mattskills

    (@mattskills)


    Hi,

    I am trying to query a table using the post title of the current post. the dj username will be the same as the post title, Can anybody help me with the right query to make $username = the current post title.

    <?php
    	$username = !!!!!!!!!!!!!!!
    $data = mysql_query("SELECT * FROM users WHERE username='$username'")
    or die(mysql_error());
     while($info = mysql_fetch_array( $data ))
    
     print "".$info['djbio'] . "";
    
    ?>

    Thanks,
    Matt

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘getting current post title from database’ is closed to new replies.