upuaut8
April 20th, 2002, 02:29 PM
...with this script
include_once ("filelock/db_include.php");
//make connection
$connect = mysql_connect($db_host,$db_user,$db_password);
//select database
mysql_select_db($db_name,$connect);
//query table
$result=mysql_query("SELECT * FROM $table_name,$connect);
$counter=0;
while ($myrow = mysql_fetch_array($result)){
printf("&date$counter=%s&name$counter=%s&email$counter=%s&site$counter=%s&comment$counter=%s",rawurlencode($myrow["date"]),rawurlencode($myrow["name"]),rawurlencode($myrow["email"]),rawurlencode($myrow["site"]),rawurlencode($myrow["comment"]));
$counter++;
}
$flag="&flag=true";
echo "$flag";
I'm getting a parse error on line 11.. which in the case of the script above is line 10 because I left off the php opener and closer tags. So it's the "printf" line
include_once ("filelock/db_include.php");
//make connection
$connect = mysql_connect($db_host,$db_user,$db_password);
//select database
mysql_select_db($db_name,$connect);
//query table
$result=mysql_query("SELECT * FROM $table_name,$connect);
$counter=0;
while ($myrow = mysql_fetch_array($result)){
printf("&date$counter=%s&name$counter=%s&email$counter=%s&site$counter=%s&comment$counter=%s",rawurlencode($myrow["date"]),rawurlencode($myrow["name"]),rawurlencode($myrow["email"]),rawurlencode($myrow["site"]),rawurlencode($myrow["comment"]));
$counter++;
}
$flag="&flag=true";
echo "$flag";
I'm getting a parse error on line 11.. which in the case of the script above is line 10 because I left off the php opener and closer tags. So it's the "printf" line