Birdmansplace Posted December 22, 2009 Share Posted December 22, 2009 I am getting this: Parse error: syntax error, unexpected T_VARIABLE in /var/www/temp2/write.php on line 169 it is this line in the code $stringData = "$b0|$b1|$b2|$b3|$b4|$b5|$b6|$b7|\n"; the hole code Its long: <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $date = $_POST['date'] ; $date1 = $_POST['date1'] ; $date2 = $_POST['date2'] ; $date3 = $_POST['date3'] ; $date4 = $_POST['date4'] ; $date5 = $_POST['date5'] ; $date6 = $_POST['date6'] ; $date7 = $_POST['date7'] ; $day = $_POST['day'] ; $mon = $_POST['mon'] ; $tues = $_POST['tues'] ; $wed = $_POST['wed'] ; $thurs = $_POST['thurs'] ; $fri = $_POST['fri'] ; $sat = $_POST['sat'] ; $sun = $_POST['sun'] ; $a0 = $_POST['a0'] ; $a1 = $_POST['a1'] ; $a2 = $_POST['a2'] ; $a3 = $_POST['a3'] ; $a4 = $_POST['a4'] ; $a5 = $_POST['a5'] ; $a6 = $_POST['a5'] ; $a7 = $_POST['a7'] ; $b0 = $_POST['b0'] ; $b1 = $_POST['b1'] ; $b2 = $_POST['b2'] ; $b3 = $_POST['b3'] ; $b4 = $_POST['b4'] ; $b5 = $_POST['b5'] ; $b6 = $_POST['b5'] ; $b7 = $_POST['b7'] ; $c0 = $_POST['c0'] ; $c1 = $_POST['c1'] ; $c2 = $_POST['c2'] ; $c3 = $_POST['c3'] ; $c4 = $_POST['c4'] ; $c5 = $_POST['c5'] ; $c6 = $_POST['c5'] ; $c7 = $_POST['c7'] ; $d0 = $_POST['d0'] ; $d1 = $_POST['d1'] ; $d2 = $_POST['d2'] ; $d3 = $_POST['d3'] ; $d4 = $_POST['d4'] ; $d5 = $_POST['d5'] ; $d6 = $_POST['d5'] ; $d7 = $_POST['d7'] ; $e0 = $_POST['e0'] ; $e1 = $_POST['e1'] ; $e2 = $_POST['e2'] ; $e3 = $_POST['e3'] ; $e4 = $_POST['e4'] ; $e5 = $_POST['e5'] ; $e6 = $_POST['e5'] ; $e7 = $_POST['e7'] ; $f0 = $_POST['f0'] ; $f1 = $_POST['f1'] ; $f2 = $_POST['f2'] ; $f3 = $_POST['f3'] ; $f4 = $_POST['f4'] ; $f5 = $_POST['f5'] ; $f6 = $_POST['f5'] ; $f7 = $_POST['f7'] ; $g0 = $_POST['g0'] ; $g1 = $_POST['g1'] ; $g2 = $_POST['g2'] ; $g3 = $_POST['g3'] ; $g4 = $_POST['g4'] ; $g5 = $_POST['g5'] ; $g6 = $_POST['g5'] ; $g7 = $_POST['g7'] ; $h0 = $_POST['h0'] ; $h1 = $_POST['h1'] ; $h2 = $_POST['h2'] ; $h3 = $_POST['h3'] ; $h4 = $_POST['h4'] ; $h5 = $_POST['h5'] ; $h6 = $_POST['h5'] ; $h7 = $_POST['h7'] ; $i0 = $_POST['i0'] ; $i1 = $_POST['i1'] ; $i2 = $_POST['i2'] ; $i3 = $_POST['i3'] ; $i4 = $_POST['i4'] ; $i5 = $_POST['i5'] ; $i6 = $_POST['i5'] ; $i7 = $_POST['i7'] ; $j0 = $_POST['j0'] ; $j1 = $_POST['j1'] ; $j2 = $_POST['j2'] ; $j3 = $_POST['j3'] ; $j4 = $_POST['j4'] ; $j5 = $_POST['j5'] ; $j6 = $_POST['j5'] ; $j7 = $_POST['j7'] ; $k0 = $_POST['k0'] ; $k1 = $_POST['k1'] ; $k2 = $_POST['k2'] ; $k3 = $_POST['k3'] ; $k4 = $_POST['k4'] ; $k5 = $_POST['k5'] ; $k6 = $_POST['k5'] ; $k7 = $_POST['k7'] ; $l0 = $_POST['l0'] ; $l1 = $_POST['l1'] ; $l2 = $_POST['l2'] ; $l3 = $_POST['l3'] ; $l4 = $_POST['l4'] ; $l5 = $_POST['l5'] ; $l6 = $_POST['l5'] ; $l7 = $_POST['l7'] ; $m0 = $_POST['m0'] ; $m1 = $_POST['m1'] ; $m2 = $_POST['m2'] ; $m3 = $_POST['m3'] ; $m4 = $_POST['m4'] ; $m5 = $_POST['m5'] ; $m6 = $_POST['m5'] ; $m7 = $_POST['m7'] ; $n0 = $_POST['n0'] ; $n1 = $_POST['n1'] ; $n2 = $_POST['n2'] ; $n3 = $_POST['n3'] ; $n4 = $_POST['n4'] ; $n5 = $_POST['n5'] ; $n6 = $_POST['n5'] ; $n7 = $_POST['n7'] ; $ = $_POST[''] ; $o1 = $_POST['o1'] ; $o2 = $_POST['o2'] ; $o3 = $_POST['o3'] ; $o4 = $_POST['o4'] ; $o5 = $_POST['o5'] ; $o6 = $_POST['o5'] ; $o7 = $_POST['o7'] ; $p0 = $_POST['p0'] ; $p1 = $_POST['p1'] ; $p2 = $_POST['p2'] ; $p3 = $_POST['p3'] ; $p4 = $_POST['p4'] ; $p5 = $_POST['p5'] ; $p6 = $_POST['p5'] ; $p7 = $_POST['p7'] ; $q0 = $_POST['q0'] ; $q1 = $_POST['q1'] ; $q2 = $_POST['q2'] ; $q3 = $_POST['q3'] ; $q4 = $_POST['q4'] ; $q5 = $_POST['q5'] ; $q6 = $_POST['q5'] ; $q7 = $_POST['q7'] ; $myFile = "file.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "$date|$date1|$date2|$date3|$date4|$date5|$date6|$date7|\n"; fwrite($fh, $stringData); $stringData = "$day|$mon|$tues|$wed|$thurs|$fri|$sat|$sun|\n"; fwrite($fh, $stringData); $stringData = "$a0|$a1|$a2|$a3|$a4|$a5|$a6|$a7|\n"; fwrite($fh, $stringData) $stringData = "$b0|$b1|$b2|$b3|$b4|$b5|$b6|$b7|\n"; fwrite($fh, $stringData) $stringData = "$c0|$c1|$c2|$c3|$c4|$c5|$c6|$c7|\n"; fwrite($fh, $stringData) $stringData = "$d0|$d1|$d2|$d3|$d4|$d5|$d6|$d7|\n"; fwrite($fh, $stringData) $stringData = "$e0|$e1|$e2|$e3|$e4|$e5|$e6|$e7|\n"; fwrite($fh, $stringData) $stringData = "$f0|$f1|$f2|$f3|$f4|$f5|$f6|$f7|\n"; fwrite($fh, $stringData) $stringData = "$g0|$g1|$g2|$g3|$g4|$g5|$g6|$g7|\n"; fwrite($fh, $stringData) $stringData = "$h0|$h1|$h2|$h3|$h4|$h5|$h6|$h7|\n"; fwrite($fh, $stringData) $stringData = "$i0|$i1|$i2|$i3|$i4|$i5|$i6|$i7|\n"; fwrite($fh, $stringData) $stringData = "$j0|$j1|$j2|$j3|$j4|$j5|$j6|$j7|\n"; fwrite($fh, $stringData) $stringData = "$k0|$k1|$k2|$k3|$k4|$k5|$k6|$k7|\n"; fwrite($fh, $stringData) $stringData = "$l0|$l1|$l2|$l3|$l4|$l5|$l6|$l7|\n"; fwrite($fh, $stringData) $stringData = "$m0|$m1|$m2|$m3|$m4|$m5|$m6|$m7|\n"; fwrite($fh, $stringData) $stringData = "$n0|$n1|$n2|$n3|$n4|$n5|$n6|$n7|\n"; fwrite($fh, $stringData) $stringData = "$|$o1|$o2|$o3|$o4|$o5|$o6|$o7|\n"; fwrite($fh, $stringData) $stringData = "$p0|$p1|$p2|$p3|$p4|$p5|$p6|$p7|\n"; fwrite($fh, $stringData) $stringData = "$q0|$q1|$q2|$q3|$q4|$q5|$q6|$q7|\n"; fwrite($fh, $stringData) fclose($fh); ?> i cant figure it out. Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/ Share on other sites More sharing options...
Buddski Posted December 22, 2009 Share Posted December 22, 2009 Your fwrite($fh, $stringData)'s are missing ; at the end.. Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/#findComment-982112 Share on other sites More sharing options...
Birdmansplace Posted December 22, 2009 Author Share Posted December 22, 2009 Wow deee deeee deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee! Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/#findComment-982114 Share on other sites More sharing options...
Birdmansplace Posted December 22, 2009 Author Share Posted December 22, 2009 Parse error: syntax error, unexpected $end in /var/www/temp2/write.php on line 200 very last line of code. Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/#findComment-982116 Share on other sites More sharing options...
Buddski Posted December 22, 2009 Share Posted December 22, 2009 closing } Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/#findComment-982118 Share on other sites More sharing options...
Birdmansplace Posted December 22, 2009 Author Share Posted December 22, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/185987-syntax-error/#findComment-982119 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.