kaz Posted June 9, 2005 Posted June 9, 2005 Parse error: parse error, unexpected ';' in /home/deathea/public_html/khaleel/xmb/shop_item.php on line 252 that line reads > mt_srand((double)microtime() * 10; $k++){ in case you need code around that line >eval("echo (\"".template('shop_confirm')."\");"); } elseif ( isset($yessubmit) ) { $thatime = time(); if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $codepart = ''; mt_srand((double)microtime() * 10; $k++){ $codepart .= $chars[mt_rand(0, $ket)]; } $thecode = $thatime.'-FunForum-'.$codepart; Quote
TCH-Andy Posted June 9, 2005 Posted June 9, 2005 From a quick look , I do as it suggests in the error, remove the ";" (it's not needed if it's within the brackets {} - but I haven't checked the code to see if the brackets are needed Quote
carbonize Posted June 9, 2005 Posted June 9, 2005 ie it should be >eval("echo (\"".template('shop_confirm')."\")"); Quote
kaz Posted June 9, 2005 Author Posted June 9, 2005 I did that, the code is now this: >eval("echo (\"".template('shop_confirm')."\")"); } elseif ( isset($yessubmit) ) { $thatime = time(); if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $codepart = ''; mt_srand((double)microtime() * 10 $k++){ $codepart .= $chars[mt_rand(0, $ket)]; } and it says now Parse error: parse error, unexpected T_VARIABLE in /home/deathea/public_html/khaleel/xmb/shop_item.php on line 251 line 251 reads >mt_srand((double)microtime() * 10 $k++){ Quote
Guest helpbytes Posted June 9, 2005 Posted June 9, 2005 (edited) > mt_srand((double)microtime() * 10; $k++){ $codepart .= $chars[mt_rand(0, $ket)]; } The error is referring to the $k++ Why is it inside the function call? In addition, why is there a { after the function call? Is it perhaps supposed to look like this? >eval("echo (\"".template('shop_confirm')."\")"); } elseif ( isset($yessubmit) ) { $thatime = time(); if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) { $chars= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012 3456789abcdefghijklmnopqrstuvwxyz'; $codepart = ''; mt_srand((double)microtime() * 10); $k++; $codepart .= $chars[mt_rand(0, $ket)]; } $thecode = $thatime.'-FunForum-'.$codepart; Edited June 9, 2005 by helpbytes Quote
kaz Posted June 9, 2005 Author Posted June 9, 2005 now i get Parse error: parse error, unexpected $, expecting ',' or ';' in /home/deathea/public_html/khaleel/xmb/shop_item.php(245) : eval()'d code on line 21 where 245 represents the line: eval("echo (\"".template('shop_confirm')."\")"); and line 21 reads $query = $db->query("SELECT id FROM $table_shop_items WHERE cid='$cid' ORDER BY dateline DESC LIMIT 0, 1"); Quote
kaz Posted June 9, 2005 Author Posted June 9, 2005 yes that line reads $cid = (isset($cid) && is_numeric($cid)) ? (int) $cid : 0; Quote
Guest helpbytes Posted June 10, 2005 Posted June 10, 2005 If you still haven't fixed it feel free to send it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.