alors, j'ai un probleme avec le script :
CODE
<?php
include("conf.php");
_AT_mysql_connect($sql_url,$sql_nom,$sql_pass) or die ("egfyui");
_AT_mysql_select_db("bdbourgeron") or die ("glkgiyg");
$q = mysql_query("SELECT * FROM img2 WHERE pass = '".$pass."' AND pseudo = '".$pseudo."'");
$ro = mysql_num_rows($q);
session_start();
if(session_is_registered("pass")){
echo "Etat de la session : session OK";
}
else
{
header("index.php");
}
?>
<html>
<head>
<title>Bla</title>
</head>
<body>
<?php
$q2 = mysql_query("select * from articles where page="'.$page.'" LIMIT 0,30 ");
if(mysql_num_rows($q) == 0){
echo "Le script fonctionne mal ...";
}
while($tableau = mysql_fetch_array($q2)){
echo "<form action='valmodif.php?page=";
echo $page;
echo "><bR><textarea name="newarticle" rows=5 cols=30 maxlength=250>";
echo $tableau['tx'];
echo "</textarea><br><input type='submit' value='Enregistrons les modifications ...'>";
echo "</form>";
?>
</body>
</html>
include("conf.php");
_AT_mysql_connect($sql_url,$sql_nom,$sql_pass) or die ("egfyui");
_AT_mysql_select_db("bdbourgeron") or die ("glkgiyg");
$q = mysql_query("SELECT * FROM img2 WHERE pass = '".$pass."' AND pseudo = '".$pseudo."'");
$ro = mysql_num_rows($q);
session_start();
if(session_is_registered("pass")){
echo "Etat de la session : session OK";
}
else
{
header("index.php");
}
?>
<html>
<head>
<title>Bla</title>
</head>
<body>
<?php
$q2 = mysql_query("select * from articles where page="'.$page.'" LIMIT 0,30 ");
if(mysql_num_rows($q) == 0){
echo "Le script fonctionne mal ...";
}
while($tableau = mysql_fetch_array($q2)){
echo "<form action='valmodif.php?page=";
echo $page;
echo "><bR><textarea name="newarticle" rows=5 cols=30 maxlength=250>";
echo $tableau['tx'];
echo "</textarea><br><input type='submit' value='Enregistrons les modifications ...'>";
echo "</form>";
?>
</body>
</html>
...
ça m'affiche :
CITATION
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/free.fr/0/0/bdbourgeron/soddier/admin/modif.php on line 22
et, aussi, pour le script :
CODE
<?php
include("conf.php");
function crunch($tx,$lg) {
$tmp = 0;
if(strlen($tx)>$lg) $tmp = strpos($tx," ",$lg);
if($tmp) $tx2 = substr($tx,0,$tmp);
else $tx2 = substr($tx,0,$lg);
if($tx2!=$tx) $tx2.=" ...";
return $tx2;
}
$i = 0;
echo "<br><br><br><bR>";
$page = "comp"+$number;
mysql_connect($sql_ch,$sql_no,$sql_pa) or die ("ugyyu");
mysql_select_db($sql_db) or die ("ikgogyu");
$q = mysql_query("select * from articles LIMIT 0,1 where page="'.$page.'"") or die ("ihlhbfrliuh");
while($row = mysql_fetch_array($q)){
echo substr(" . $row['tx'] . ",0," . $row['lg1'] . ");
}
mysql_close();
?>
include("conf.php");
function crunch($tx,$lg) {
$tmp = 0;
if(strlen($tx)>$lg) $tmp = strpos($tx," ",$lg);
if($tmp) $tx2 = substr($tx,0,$tmp);
else $tx2 = substr($tx,0,$lg);
if($tx2!=$tx) $tx2.=" ...";
return $tx2;
}
$i = 0;
echo "<br><br><br><bR>";
$page = "comp"+$number;
mysql_connect($sql_ch,$sql_no,$sql_pa) or die ("ugyyu");
mysql_select_db($sql_db) or die ("ikgogyu");
$q = mysql_query("select * from articles LIMIT 0,1 where page="'.$page.'"") or die ("ihlhbfrliuh");
while($row = mysql_fetch_array($q)){
echo substr(" . $row['tx'] . ",0," . $row['lg1'] . ");
}
mysql_close();
?>
ça m'affiche (aussi) :
CITATION
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/free.fr/0/0/bdbourgeron/soddier/scripratik.php on line 16
c'est bizarre ... ça fait un moment que j'ai des mess d'erreur chez free avec des _STRING_ ...