Iank1968 Posted March 2, 2009 Author Share Posted March 2, 2009 I think im gonna try echoing it, everytime I put <? or <?php I get the parse error Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774460 Share on other sites More sharing options...
Iank1968 Posted March 2, 2009 Author Share Posted March 2, 2009 Well that fixed that problem, thank you very much. Now I have a boat load more coming up. This code is all wrong. Parse error: syntax error, unexpected T_IF, expecting T_VARIABLE or '$' in /home/ianapps/public_html/globetrotters/common.php on line 278 and im sure there are 100's more. Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774461 Share on other sites More sharing options...
Iank1968 Posted March 2, 2009 Author Share Posted March 2, 2009 Do you feel like going threw 1900 lines of code? lol Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774463 Share on other sites More sharing options...
daviddth Posted March 2, 2009 Share Posted March 2, 2009 I think im gonna try echoing it, everytime I put <? or <?php I get the parse error Thats because you HAVE to close off the php section with ?> before the html section starts. I have been coding html for 12 or so years, but started php about 3 weeks ago - been a massive learning curve getting the site updated, but thanks to the books I have purchased, google, and also help from people in here, I have managed to end up with what I think is a reasonably functioning site, but I am still learning HEAPS, and have a lot more to learn. Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774464 Share on other sites More sharing options...
Iank1968 Posted March 2, 2009 Author Share Posted March 2, 2009 I actually used the <?php and got the error, left it out and its ok, this is a new error. every 10-20 lines or so theres an error. Would you be interested in seeing the code? Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774466 Share on other sites More sharing options...
daviddth Posted March 2, 2009 Share Posted March 2, 2009 Probably not a bad idea to start a bit of study on how php and html work. I guess this is code you have sourced from elsewhere, and you are trying to adapt it to your page. I guess this is a good (but steep) learning curve for you lol Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774468 Share on other sites More sharing options...
Iank1968 Posted March 2, 2009 Author Share Posted March 2, 2009 lol yep, its not my code entirely. I did write some of it, probably all the errors lol. I have been looking at this code for weeks to no avail. If you want to try and look at it I will send it to you, if not no worries. im just getting an aneurism from it lol Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774472 Share on other sites More sharing options...
jackpf Posted March 2, 2009 Share Posted March 2, 2009 lol yep, its not my code entirely. I did write some of it, probably all the errors lol. I have been looking at this code for weeks to no avail. If you want to try and look at it I will send it to you, if not no worries. im just getting an aneurism from it lol Tbh, if you're going to actually use php, you should probably learn it properly. If you don't understand the difference between php and html, you should probably learn it. Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774491 Share on other sites More sharing options...
killah Posted March 2, 2009 Share Posted March 2, 2009 If your still getting the error. function GetInTradesSideBar ($user) { global $logtrade_table; $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_from,what,amt,what_req,amt_req,auth FROM $logtrade_table WHERE uid_to=$user and hide=0 and auth=0 ORDER by date DESC"); // get trades coming into you $i=0; if (mysql_num_rows ($result) == 0) return "<br/>."; $a = '<table>'; while ($row = mysql_fetch_array ($result)) { $u = $row['uid_from']; $a .= '<tr><td bgcolor="#eaeaea"><fb:profile-pic uid="'.$u.'"/> <br/><fb:name uid="'.$u.'"/></td><td bgcolor="#eaeaea">' . date ("F j", $row['datets'] ) . ' - <b><a href="?id=trade">View</a></b></td></tr>'; $i++; } $a .= '</table>'; return $a; } function GetOutTrades ($user) { global $logtrade_table; $result = Query ("SELECT id,unix_timestamp(date) as datets,uid_to,what,amt,what_req,amt_req,auth,hide FROM $logtrade_table WHERE uid_from=$user ORDER by date DESC limit 50 "); // get trades coming into you $i=0; while ($row = mysql_fetch_array ($result)) { $out[$i]['id'] = $row['id']; $out[$i]['date'] = $row['datets']; $out[$i]['uid_to'] = $row['uid_to']; $out[$i]['what'] = $row['what']; $out[$i]['amt'] = $row['amt']; $out[$i]['what_req'] = $row['what_req']; $out[$i]['amt_req'] = $row['amt_req']; $out[$i]['auth'] = $row['auth']; $out[$i]['hide'] = $row['hide']; $i++; } return $out; } // some php function ParseInTrades ($data) { global $db_to_desc_send; if (!count($data)) return; global $facebook; } ?> <table border="0" colspacing="2" colpadding="2"> <tr> <th width="100"> <h3 class="subtitle">Date</h3> </th> <th width="120"> <h3 class="subtitle">Name</h3> </th> <th width="120"> <h3 class="subtitle">You Get</h3> </th> <th width="120"> <h3 class="subtitle">They want</h3> </th><th width="80"> <h3 class="subtitle">Action</h3> </th> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/147466-getting-parse-error-syntax-error-unexpected/page/2/#findComment-774494 Share on other sites More sharing options...
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.