Paldo Posted June 8, 2009 Share Posted June 8, 2009 Hi as it's getting late I'm getting more sleepy and I just can't find what I miss somewhere... Thanks for helping me out... It say: Parse error: parse error, expecting `','' or `';'' in /3w/euweb.cz/p/parobek/captcha.php on line 6 <?php ob_start(); session_start(); if(!$_POST['submit']){ echo "<form method="post" action="captcha.php">n"; echo "<table border="0" cellspacing="3" cellpadding="3">n"; echo "<tr><td>Type The Letters You See Below Into the Box</td></tr>n"; echo "<tr><td align="center"><img src="image.php"></td></tr>n"; echo "<tr><td align="right"><input type="text" name="image"></td></tr>n"; echo "<tr><td align="right"><input type="submit" name="submit" value="Check CAPTCHA"></td></tr>n"; echo "</table></form>n"; }else { $image = $_POST['image']; if($image == $_SESSION['string']){ echo "<b>Great success!</b>n"; }else { echo "<em>Failure!</em>n"; } } ob_end_flush(); ?> Link to comment https://forums.phpfreaks.com/topic/161437-solved-somebody-please-have-a-look-i-missed-or-and-i-cant-find-it/ Share on other sites More sharing options...
gevans Posted June 8, 2009 Share Posted June 8, 2009 you need to escape double quotes inside a double quotes string e.g; echo "<form method="post" action="captcha.php">n"; should be echo "<form method=\"post\" action=\"captcha.php\">\n"; or even easier echo '<form method="post" action="captcha.php">'."\n"; Link to comment https://forums.phpfreaks.com/topic/161437-solved-somebody-please-have-a-look-i-missed-or-and-i-cant-find-it/#findComment-851942 Share on other sites More sharing options...
Paldo Posted June 8, 2009 Author Share Posted June 8, 2009 Ok so I changed it as you say but it still says the same error... Parse error: parse error, expecting `','' or `';'' in /3w/euweb.cz/p/parobek/captcha.php on line 6 And BTW: Why it makes all the \ disapered in whole document??? <?php ob_start(); session_start(); if(!$_POST['submit']){ echo '<form method="post" action="captcha.php">'"n"; echo '<table border="0" cellspacing="3" cellpadding="3">' "n"; echo '<tr><td>Type The Letters You See Below Into the Box</td></tr>'"n"; echo '<tr><td align="center"><img src="image.php"></td></tr>' "n"; echo '<tr><td align="right"><input type="text" name="image"></td></tr>'"n"; echo '<tr><td align="right"><input type="submit" name="submit" value="Check CAPTCHA"></td></tr>' "n"; echo '</table></form>'"n"; }else { $image = $_POST['image']; if($image == $_SESSION['string']){ echo '<b>Great success!</b>n"; }else { echo '<em>Failure!</em>n'; } } ob_end_flush(); ?> Link to comment https://forums.phpfreaks.com/topic/161437-solved-somebody-please-have-a-look-i-missed-or-and-i-cant-find-it/#findComment-851953 Share on other sites More sharing options...
cunoodle2 Posted June 8, 2009 Share Posted June 8, 2009 You didn't read gevans post very well. You missed the line. I'll fix it for you here... <?php ob_start(); session_start(); if(!$_POST['submit']){ echo '<form method="post" action="captcha.php">'."\n"; echo '<table border="0" cellspacing="3" cellpadding="3">'."\n"; echo "<tr><td>Type The Letters You See Below Into the Box</td></tr>\n"; echo '<tr><td align="center"><img src="image.php"></td></tr>'."\n"; echo '<tr><td align="right"><input type="text" name="image"></td></tr>'."\n"; echo '<tr><td align="right"><input type="submit" name="submit" value="Check CAPTCHA"></td></tr>'."\n"; echo "</table></form>\n"; }else { $image = $_POST['image']; if($image == $_SESSION['string']){ echo "<b>Great success!</b>\n"; }else { echo "<em>Failure!</em>\n"; } } ob_end_flush(); ?> THIS IS MY 500th POST ON PHP FREAKS!!! It came quickly and I think this site is BAD ARSE!!!! Link to comment https://forums.phpfreaks.com/topic/161437-solved-somebody-please-have-a-look-i-missed-or-and-i-cant-find-it/#findComment-851957 Share on other sites More sharing options...
Paldo Posted June 8, 2009 Author Share Posted June 8, 2009 thanks man Link to comment https://forums.phpfreaks.com/topic/161437-solved-somebody-please-have-a-look-i-missed-or-and-i-cant-find-it/#findComment-851959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.