Welcome, Guest
  • Author Topic: Problem with tags  (Read 5151 times)

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #15 on: 06/21/08, 18:20 »
    then i get this code:
    I think its the same thing when i open the guestbook.php with localhost

    &entries="; if($numallComments == 0) { print "Nog geen berichten.."; } else { while ($array = mysql_fetch_array($fewComments)) { $name = mysql_result($fewComments, $i, 'name'); $email = mysql_result($fewComments, $i, 'email'); $comments = mysql_result($fewComments, $i, 'comments'); $time = mysql_result($fewComments, $i, 'time'); print 'Name: ' . $name . '
    Email: ' . $email . '
    Comments: ' . $comments . '
    Date: ' . $time . '

    '; $i++; } } // Print this only when there aren't any more entries.. if($_GET['NumLow'] > $numallComments) { print 'Geen berichten meer!&'; } break; case 'write' : // Recieve Variables From Flash $name = ereg_replace("&", "%26", $_POST['yourname']); $email = ereg_replace("&", "%26", $_POST['youremail']); $comments = ereg_replace("&", "%26", $_POST['yourcomments']); $submit = $_POST['submit']; // Current system date in yyyy-mm-dd format $submitted_on = date ("Y-m-d H:i:s",time()); // Check if its submitted from Flash if($submit == 'Yes'){ // Insert the data into the mysql table $sql = 'INSERT INTO ' . $table . ' (`ID`, `name`, `email`, `comments`, `time` ) VALUES (\'\',' . '\'' . $name . '\',' . '\'' . $email . '\',' . '\'' . $comments . '\',' . '\'' . $submitted_on . '\' )'; $insert = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error()); // If you want your script to send email to both you and the guest, uncomment the following lines of code // Email Script Begin $MyName = "Mohsin Sumar"; $MyEmail = "mohsinsumar@hotmail.com"; $Subject = "$name has just signed your guestbook."; $EmailBody = "Hello Mohsin,\n$name has just signed your guestbook available at http://www.mohsinsumar.com. THe following were the details submitted into your guestbook:\n\nName: $name\nEmail: $email\nComment:\n$comments\n"; $EmailFooter = "~~~~~~~~~~~~~~~\nThe guestbook was signed by $name and thus this email got activated by $name from $REMOTE_ADDR from http://www.mohsinsumar.com\n~~~~~~~~~~~~~~~\nThanking you,\nMohsin Sumar"; $Message = $EmailBody.$EmailFooter; mail($MyName." <".$MyEmail.">",$Subject, $Message, "From: ".$name." <".$email.">"); --> Remove this line */ // Email Script End print "&gb_status=Bedankt dat je in me gastboek heb geschreven.&done=yes&"; return; } print "&_root.write.gb_status=Error!&"; break; } ?>

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #16 on: 06/22/08, 02:39 »
    you did some modification to the php, and somehow either lost, or added a quote.

    Use the original script, which might need modification for your personal things, and then modify, when it is running, to findout what and how to modify.
    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #17 on: 06/22/08, 05:50 »
    ok now this is the original script:

    &entries="; if($numallComments == 0) { print "No entries in the guestbook, as yet.."; } else { while ($array = mysql_fetch_array($fewComments)) { $name = mysql_result($fewComments, $i, 'name'); $email = mysql_result($fewComments, $i, 'email'); $comments = mysql_result($fewComments, $i, 'comments'); $time = mysql_result($fewComments, $i, 'time'); print 'Name: ' . $name . '
    Email: ' . $email . '
    Comments: ' . $comments . '
    Date: ' . $time . '

    '; $i++; } } // Print this only when there aren't any more entries.. if($_GET['NumLow'] > $numallComments) { print 'No More Entries!&'; } break; case 'write' : // Recieve Variables From Flash $name = ereg_replace("&", "%26", $_POST['yourname']); $email = ereg_replace("&", "%26", $_POST['youremail']); $comments = ereg_replace("&", "%26", $_POST['yourcomments']); $submit = $_POST['submit']; // Current system date in yyyy-mm-dd format $submitted_on = date ("Y-m-d H:i:s",time()); // Check if its submitted from Flash if($submit == 'Yes'){ // Insert the data into the mysql table $sql = 'INSERT INTO ' . $table . ' (`ID`, `name`, `email`, `comments`, `time` ) VALUES (\'\',' . '\'' . $name . '\',' . '\'' . $email . '\',' . '\'' . $comments . '\',' . '\'' . $submitted_on . '\' )'; $insert = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error()); // If you want your script to send email to both you and the guest, uncomment the following lines of code // Email Script Begin /* <-- Remove this line $MyName = "Mohsin Sumar"; $MyEmail = "mohsinsumar@hotmail.com"; $Subject = "$name has just signed your guestbook."; $EmailBody = "Hello Mohsin,\n$name has just signed your guestbook available at http://www.mohsinsumar.com. THe following were the details submitted into your guestbook:\n\nName: $name\nEmail: $email\nComment:\n$comments\n"; $EmailFooter = "~~~~~~~~~~~~~~~\nThe guestbook was signed by $name and thus this email got activated by $name from $REMOTE_ADDR from http://www.mohsinsumar.com\n~~~~~~~~~~~~~~~\nThanking you,\nMohsin Sumar"; $Message = $EmailBody.$EmailFooter; mail($MyName." <".$MyEmail.">",$Subject, $Message, "From: ".$name." <".$email.">"); --> Remove this line */ // Email Script End print "&gb_status=Thank you for signing my guestbook.&done=yes&"; return; } print "&_root.write.gb_status=Error!&"; break; } ?>

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #18 on: 06/22/08, 06:48 »
    download the original again - this script is definately broken.
    The script mus start with <?php and end with ?>
    If this is not the case, it will not be recognized as a php script.
    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #19 on: 06/22/08, 07:19 »
    i downloaded it again and got the same thing..
    i open the .php file and the file started with <? i changed that in <?php

    then i clicked this link again >http://localhost/guestbook/GuestBook.php?action=read&numLow=0
    and now it says:
    Error in GuestBook Application: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 10' at line 1


    but i checked the swf file with localhost and it works..
    i see now the name email and comments in the view

    thnx ;D
    « Last Edit: 06/22/08, 07:23 by nooby »