voici mon problème
http://www.frederic-gingreau.com/guestbook/index.php
je me connecte je fais tout dans les regles de l'art via le tutorial de facebook développer ,
ca marche, apres quand j'envois un message ca ne l'affiche pas et ne le sauvegarde pas
j'ai pas de retour
voici un file index.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>guestbook personal trainer 06</title>
<link href="./css/style.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="./js/application.js" type="text/javascript"></script>
</head>
<body>
<div id="pagewrap">
<div class="head">
<h1 class="title">GuestBook</h1>
</div>
<div class="body">
<div class="photo">
<p><img src="media/fredo.png" width="314" height="374" alt="fredo" longdesc="http://www.frederic-gingreau.com/guestbook/media/fredo.png" /></p>
<div class="caption">
</div>
</div>
<div class="comments">
<h2 class="sub-title">Comments</h2>
<?php include("php/readcomments.php"); ?>
</div>
<div class="new-comment">
<h2 class="sub-title">Add A Comment</h2>
<form action="php/savecomment.php" id="comment-form" method="post">
<div id="userbox" style="display:none;"></div>
<div id="userinfo">
Name: <input id="name" name="name" type="text" />
<input id="url" name="url" type="hidden" />
<input id="image" name="image" type="hidden" />
<!-- login services -->
<div class="services">
<fb:login-button length="long" onlogin="auth_using_fb();"></fb:login-button>
<div id="google-login"></div>
</div>
</div>
<div class="comment">
Comment:<br />
<textarea id="comment" name="comment"></textarea>
</div>
<input type="submit" value="Send Comment" />
</form>
</div>
</div>
</div>
<!-- Facebook API Includes -->
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB.init("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xd_receiver.htm", {"ifUserConnected" : auth_using_fb});
</script>
<!-- Google API Includes -->
<script src="http://www.google.com/friendconnect/script/friendconnect.js?v=0.8" type="text/javascript"></script>
</body>
</html>
un file savecomment
<?php
if(isset($_POST['name'], $_POST['comment'])) {
//line we will insert into the text file
$comment_line = $_POST['name'] . "|"
. $_POST['url'] . "|"
. $_POST['image'] . "|"
. $_POST['comment'];
//save $comment_line to comments file
$fp = fopen('http://www.frederic-gingreau.com/guestbook/data/comments.db', 'a');
fwrite($fp, $comment_line."\n");
fclose($fp);
header("Location: http://www.frederic-gingreau.com/guestbook/index.php");
} else {
echo("All fields are required!");
}
?>
un file read comment
<?php
$comments = file('http://www.frederic-gingreau.com/guestbook/data/comments.db');
if(!empty($comments)) {
foreach($comments as $comment)
{
$comment = explode("|", $comment, 4);
?>
<div class="comment">
<div class="user">
<a href="<?= $comment[1] ?>">
<?php if(!empty($comment[2])) { ?> <img alt="<?= $comment[0] ?>" src="<?= $comment[2] ?>" <?php } ?> />
<?= $comment[0] ?>
</a>
</div>
<?= $comment[3] ?>
</div>
<?php
}
}
je pense que le probleme se situe la ou pas lol
quelqu'un peut m'aider?t
ai je besoin d'une database , je vois un fichier comments.DB ?
je ne peux l'ouvrir, quand je l'ouvre avec textedit j'ai ce que le gars du tutorial a mis, si je l'efface je n'ai plus rien mais qd j'envois rien ne s'enregistre comme avant
a ma disposition : iweb 9 dreamweaver, cyberduck.
http://www.frederic-gingreau.com/guestbook/index.php
je me connecte je fais tout dans les regles de l'art via le tutorial de facebook développer ,
ca marche, apres quand j'envois un message ca ne l'affiche pas et ne le sauvegarde pas
j'ai pas de retour
voici un file index.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>guestbook personal trainer 06</title>
<link href="./css/style.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="./js/application.js" type="text/javascript"></script>
</head>
<body>
<div id="pagewrap">
<div class="head">
<h1 class="title">GuestBook</h1>
</div>
<div class="body">
<div class="photo">
<p><img src="media/fredo.png" width="314" height="374" alt="fredo" longdesc="http://www.frederic-gingreau.com/guestbook/media/fredo.png" /></p>
<div class="caption">
</div>
</div>
<div class="comments">
<h2 class="sub-title">Comments</h2>
<?php include("php/readcomments.php"); ?>
</div>
<div class="new-comment">
<h2 class="sub-title">Add A Comment</h2>
<form action="php/savecomment.php" id="comment-form" method="post">
<div id="userbox" style="display:none;"></div>
<div id="userinfo">
Name: <input id="name" name="name" type="text" />
<input id="url" name="url" type="hidden" />
<input id="image" name="image" type="hidden" />
<!-- login services -->
<div class="services">
<fb:login-button length="long" onlogin="auth_using_fb();"></fb:login-button>
<div id="google-login"></div>
</div>
</div>
<div class="comment">
Comment:<br />
<textarea id="comment" name="comment"></textarea>
</div>
<input type="submit" value="Send Comment" />
</form>
</div>
</div>
</div>
<!-- Facebook API Includes -->
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB.init("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xd_receiver.htm", {"ifUserConnected" : auth_using_fb});
</script>
<!-- Google API Includes -->
<script src="http://www.google.com/friendconnect/script/friendconnect.js?v=0.8" type="text/javascript"></script>
</body>
</html>
un file savecomment
<?php
if(isset($_POST['name'], $_POST['comment'])) {
//line we will insert into the text file
$comment_line = $_POST['name'] . "|"
. $_POST['url'] . "|"
. $_POST['image'] . "|"
. $_POST['comment'];
//save $comment_line to comments file
$fp = fopen('http://www.frederic-gingreau.com/guestbook/data/comments.db', 'a');
fwrite($fp, $comment_line."\n");
fclose($fp);
header("Location: http://www.frederic-gingreau.com/guestbook/index.php");
} else {
echo("All fields are required!");
}
?>
un file read comment
<?php
$comments = file('http://www.frederic-gingreau.com/guestbook/data/comments.db');
if(!empty($comments)) {
foreach($comments as $comment)
{
$comment = explode("|", $comment, 4);
?>
<div class="comment">
<div class="user">
<a href="<?= $comment[1] ?>">
<?php if(!empty($comment[2])) { ?> <img alt="<?= $comment[0] ?>" src="<?= $comment[2] ?>" <?php } ?> />
<?= $comment[0] ?>
</a>
</div>
<?= $comment[3] ?>
</div>
<?php
}
}
je pense que le probleme se situe la ou pas lol
quelqu'un peut m'aider?t
ai je besoin d'une database , je vois un fichier comments.DB ?
je ne peux l'ouvrir, quand je l'ouvre avec textedit j'ai ce que le gars du tutorial a mis, si je l'efface je n'ai plus rien mais qd j'envois rien ne s'enregistre comme avant
a ma disposition : iweb 9 dreamweaver, cyberduck.