Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: Updater

  1. #21
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Wait I think I just found it. In your fix I was copying and pasting the fix which had "[something]" something to this effect to save on space. Let me change that. I'll tell you how it works out.

  2. #22
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Alright. Glad it's working.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #23
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Wait no its not working. Here is my codes.....

    *index
    PHP Code:
    <html>
    <head>
    <title>Comment Demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <div align="center">
      <div align="left">
        <table width="80%" border="" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left">
                <?php
                   
    if ($file = @file_get_contents("comments.phpdata")) {
                    echo 
    $file."\n";
                    }
                else {echo 
    "Sorry, but no comments were found.";}
            
    ?>
            </td>
          </tr>
        </table>
      </div>
      <p align="left"><a href="add.php">Add Comment</a></p>
    </div>
    </body>
    </html>
    *add.php
    PHP Code:
    <html>
    <head>
    <title>Add Comment Demo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/javascript" src="http://www.bellsouthpwp2.net/c/h/christwebs/WYSIWYG/wysiwyg.js">
    </script>
    </head>
    <body>
    <div align="center"> 
      <p><font size="+1">Add Comment Demo:</font></p>
    <form name="form1" method="post" action="sent.php" onSubmit="formatText('ViewText','comment');">
        <textarea name="comment" id="textarea1" cols="60" rows="10"><?php
          
    if ($file = @file_get_contents("comments.phpdata")) {
             echo 
    $file."\n";
              }
             else {echo 
    "Sorry, But your page is blank";}
             
    ?></textarea><br>
        <script language="javascript1.2">
      generate_wysiwyg('textarea1');
    </script>
        <input type="submit" value="submit">
    </form>
        <a href="index.php">Back</a>
    </div>
    </body>
    </html>
    *Sent.php
    PHP Code:
    <?php

    $filename 
    "comments.phpdata";
    if (
    $name stripslashes($_POST['comment'])) {
        
    $comment str_replace("<","&lt;",$comment); 
        
    $comment str_replace(">""&gt;"$comment);

        
    $file = @fopen($filename"w+");
        @
    fwrite($file$comment);
        @
    fclose($file);
        
    $message "Your comment was successfully added.<br>Redirecting to index.php";
        }
    else {
        
    $message "You either entered no data or it was entered incorrectly.<br>Redirecting to index.php";
        }
    ?>
    <html>
    <head>
    <title>Comment Added Demo</title>
    <meta http-equiv="refresh" content="3;url=index.php">
    </head>
    <body>
    <div align="center"> 
    <p><font size="+1">Comment Added Demo:</font></p>
    <?php echo $message?>
    </div>
    </body>
    </html>
    Attachment 365

    Maybe you might know what the problem is by looking at these. Please dont give up.

    Edit:http://benslayton.awardspace.com

  4. #24
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Er... try using this php code instead of what is there right now:

    PHP Code:
    <?php
    $filename 
    "comments.phpdata";
    if (
    $comment stripslashes($_POST['comment'])) {
        
    $file = @fopen($filename"w+");
        @
    fwrite($file$comment);
        @
    fclose($file);
        
    $message "Your comment was successfully added.<br>Redirecting to index.php";
        }
    else {
        
    $message "You either entered no data or it was entered incorrectly.<br>Redirecting to index.php";
        }
    ?>
    Note: Yes, remove:
    $comment = str_replace("<","&lt;",$comment);
    $comment = str_replace(">", "&gt;", $comment);
    Last edited by djr33; 06-07-2006 at 04:28 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #25
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Naw, that doesnt work either. Any other Suggestions?

  6. #26
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I edited, changing a couple things. Make sure you have the newest version.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #27
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Ok your edit above did work. Thanks!!!
    One other problem It wont let me add color to the back, text, etc. (to all the popups) any sugg. there?

  8. #28
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Popups?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #29
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Yea, when you click on the background color button, the font color button, the hyperlink button.... They open up popups. But doesnt change the color.

  10. #30
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I just tried quotes.

    I also edited (after I posted the last time).... 'cause I figured out what was wrong.


    change the if line to:
    if ($comment = stripslashes($_POST['comment'])) {
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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