Jump to content

A2xA

Members
  • Posts

    137
  • Joined

  • Last visited

    Never

Posts posted by A2xA

  1. In my script it gets the users username and does a..

     

    WHERE userUser = "' . $user . '"';

     

    This works fine for every user except ones that have there usernames start with any number.

     

    userUser's mysql info is..

     

    Field  Type  Collation  Attributes  Null  Default  Extra

     

    userUser  varchar(16)  latin1_swedish_ci   No 

     

     

    It's also stored fine.  Just verifying the WHERE is not working.

     

    Thanks  :-\

  2. It's the chat.php page that has all of the javascript functions for the chat script. 

     

    Here's the whole form that is sending info to the chat.php page.

     

    <div id="chat">Connecting...</div>
     <input id="message" type="text" size="53" maxlength="100" onkeyup="keyup(event);" />
    <input type="button" value="Submit" onclick="chat_write();" /><br />
    <script language="JavaScript" type="text/javascript" src="./chat.php?hubid=<?php echo $hubid ?>">

     

    All i need in the chat.php page is the variable passed from this page.

  3. In the script I have two files the hub.php file and the chat.php file.  The hub.php file has the form and style where the chat.php has the code.

     

    In the chat.php file it creates a text file.  I need the variable from the hub.php page passed to the chat.php page for the name of it.

     

    In the hub.php page I've got..

     

     

    <?php $hubid = $_GET['hubid'];
    
    //Some Code
    ?>
    <script language="JavaScript" type="text/javascript" src="./chat.php?hubid=<?=$hubid?>">
    </script>

     

    In the second chat.php page I've got..

    <?php
    
    $hubid = $_GET['hubid'];
    $hubid2 = $hubid;
    
    // Path to the text files holding the chat window content
    $fn = $hubid2.txt;
    
    ?>

     

    This is not working and I was wondering how to pass the variable.  If someone could help I would greatly appreciate it.

  4. I'm using a chat script I've made and the script has 2 seperate files the hub.php and the chat.php page.  The hub.php has the form and sends the info to the chat.php page where it adds to the chat. 

     

    I need the hub.php to send a variable through javascript to the chat.php on page load and not on the form submit.

     

    What I'm passing is the page id.. Example: http://mysite.com/hub.php?id=dkjhf3883

     

    What could I add here?

     

    I've got the id defined as $hubid in php.

     

    <div id="chat">Connecting...</div>
     <input id="message" type="text" size="53" maxlength="100" onkeyup="keyup(event);" />
    <input type="button" value="Submit" onclick="chat_write();" /><br />
    <script language="JavaScript" type="text/javascript" src="./chat.php"></script>

     

    Thanks! if you need more of the script or don't understand feel free to ask.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.