Jump to content

Shout box


bibistroc

Recommended Posts

I have this script make on my own but i don`t like because when i write a line, the script write the line after last. I want the new lines to be write under the old lines.

 

<html>
<form action="write.php" method="get">
Text: <input type="text" name="text" />
<input type="submit" />
</form>
<iframe src=text.txt>
</html>

<?php

$your_data = $_GET["text"];

// Open the file and erase the contents if any
$fp = fopen("text.txt", "a");

// Write the data to the file
fwrite($fp, $your_data);

// Close the file
fclose($fp);

?>

Link to comment
Share on other sites

Look what I wanna do:

i have another script:

<?php
    $phpbb_root_path = './';
    define('IN_PHPBB', true);  
    if (!file_exists($phpbb_root_path . 'extension.inc'))  {     
        die ('<tt><b>Sorry!</b>        Phpbb root is wrong, please reconfigure</tt>');  
    }    
    include($phpbb_root_path . 'extension.inc');  
    include($phpbb_root_path . 'common.php');  
    include($phpbb_root_path . 'includes/bbcode.php');    
    $userdata = session_pagestart($user_ip, PAGE_INDEX);  
    init_userprefs($userdata);    
?>  

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
    <head>   
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  
        <META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">  
    </head>  
    <body bgcolor=white topmargin=50>  
        <!--login-->  
        <?php 
            if (!$userdata or !$userdata['session_logged_in'])  { 
                ?>    
                <table width="45%" align="left" cellpadding="1" cellspacing="1" border="0">   
                    <tr>    
                    <td>   
                        <form action="<?php echo $phpbb_root_path; ?>login.php" method="post" target="_top">  
                        <input type="hidden" name="redirect" value="../index.php">  
                        <input type="hidden" name="sid" value="<?php echo $userdata['session_id']; ?>">  
                        <input type="hidden" name="outside" value="1">  
                        Intra:<br><br>
                        Userul: <input type="text" name="username" size="15" maxlength="40">  <br><br>
                        Parola: <input type="password" name="password" size="15" maxlength="25">  <br><br>
                        <input type="submit" name="login" value="Intra">  
                        <input type="button" name="Register" value="Inregistreaza-te" onClick="parent.location='<?php echo append_sid($phpbb_root_path .  'profile.php?mode=register'); ?>'">  
                        </form>  
                    </td>  
                    </tr>  
                </table>  
                <br />  
                <br />  
                <?php 
            }   else  {
                ?>   
                <table width="45%" align="left" cellpadding="1" cellspacing="1" border="0">   
                    <tr>
                    <td> User:  <?php $userdata['username']?>
            }  ?>  
                    </td>  
                    </tr>  
                </table>  
        <!--login-->  
    </body>  
</html>

 

 

This script works with phpBB and i want to make a shoutbox on my site, and the name of people to be the user from phpBB forum.

 

I try to integrate this two script but it don`t works.

Please help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.