Results 1 to 4 of 4

Thread: Sending Info from IE Window to IE Window and MySQL prob!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312

    Sending Info from IE Window to IE Window and MySQL prob!!

    Hey... Im tyrign to make an MP3 player for the broadband part of my site, however, although i can make it play MP3s, i want to be able to get the MP3 Selection window to make the Actual Site window play te music, if you understand what i mean ? If not then i will try to simplyfy it (but that wasnt simple )....

    1.Person Opens MP3 Window from site, 2 windows open.
    2.Cliick the song they want to play, and click Play in the MP3 window.
    3.All i need now is the MP3 window to change a variable in the main window, so the loop thats checking to see if the variable has changed, notices, and thus changes the song accordingly..

    So all i really need is a way of chaging a variable from 1 window to another

    The MySQL problem is weird, i don tknwo why it wont work.....
    Code:
    if (isset($_POST['submit'])) {
    	$link = mysql_connect("localhost","username","password");
    		if(!$link) die ("couldnt connect to $link");
    
    	mysql_select_db("abunting", $link);
    
        $query = "SELECT 1 FROM site_members WHERE Alias='$alias' AND password='$password'";
    
        $result = mysql_query($query, $link) or die(mysql_error());
    
        if($result == 1) {
        	print " ".mysql_result($result, 0)." the username and password you entered was correct";
        } else {
        print " ".mysql_result($result, 0)." the login you entered or the password you entered is incorrect";
        }
    }
    surely result becomes 1 if the login and password are correct, but this doesnt seem to work!

    Thanks
    Last edited by JafferAB; Aug 30th, 2002 at 09:11 AM.
    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337

    Re: Sending Info from IE Window to IE Window and MySQL prob!!

    Originally posted by JafferAB
    Hey... Im tyrign to make an MP3 player for the broadband part of my site, however, although i can make it play MP3s, i want to be able to get the MP3 Selection window to make the Actual Site window play te music, if you understand what i mean ? If not then i will try to simplyfy it (but that wasnt simple )....

    1.Person Opens MP3 Window from site, 2 windows open.
    2.Cliick the song they want to play, and click Play in the MP3 window.
    3.All i need now is the MP3 window to change a variable in the main window, so the loop thats checking to see if the variable has changed, notices, and thus changes the song accordingly..

    So all i really need is a way of chaging a variable from 1 window to another

    The MySQL problem is weird, i don tknwo why it wont work.....
    Code:
    if (isset($_POST['submit'])) {
    	$link = mysql_connect("localhost","username","password");
    		if(!$link) die ("couldnt connect to $link");
    
    	mysql_select_db("abunting", $link);
    
        $query = "SELECT 1 FROM site_members WHERE Alias='$alias' AND password='$password'";
    
        $result = mysql_query($query, $link) or die(mysql_error());
    
        if($result == 1) {
        	print " ".mysql_result($result, 0)." the username and password you entered was correct";
        } else {
        print " ".mysql_result($result, 0)." the login you entered or the password you entered is incorrect";
        }
    }
    surely result becomes 1 if the login and password are correct, but this doesnt seem to work!

    Thanks
    your kidding right?

    $query = "SELECT 1 FROM site_members WHERE Alias='$alias' AND password='$password'";

    what is the RED? and those variables will be blank if you are running from a post from a form. use $_POST['alias']

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312
    it only selects one! and thanks for the variables thing, was that only implemented in PHP 4 ?
    Power to 2000 Electronic Donkeys!
    www.edonkey2000.com
    I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".

  4. #4
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    you can't do it that way. select 1 form table is not correct.

    you need to select it all or one column


    select column from table

    and teh globals thing was implimented in version 4.2

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