freddyw Posted December 9, 2009 Share Posted December 9, 2009 So im creating a page where users can directly update their twitter status and im recieving this error Parse error: syntax error, unexpected '{' on line 19 I dont understand. heres my code <h2>Update Twitter Status</h2> <?php if (!isset($_POST['submit'])) { ?> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> Username: <br/> <input type="text" name="user" /><br/> Password: <br/> <input type="password" name="pass" /><br/> New status message: <br/> <textarea name="status" cols="15"></textarea><br/> <input type="submit" name="submit" value="Update Status" /> </form> </form> <?php } else { // include class include_once 'Services/Twitter.php'; try { // read form input $user = $_POST['user']; $pass = $_POST['pass']; $status = $_POST['status']; // initialize service object $service = new Services_Twitter($user, $pass); // update status $service->statuses->update($status); // perform logout $service->account->end_session(); echo 'Status updated!'; } catch (Exception $e) { die('ERROR: ' . $e->getMessage()); } } ?> any clues? Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/ Share on other sites More sharing options...
mrMarcus Posted December 9, 2009 Share Posted December 9, 2009 please post entire error message: Parse error: syntax error, unexpected '{' on line 19 of 'some file here which is relevant information to fixing the problem error is probably within 'Services/Twitter.php' Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/#findComment-974211 Share on other sites More sharing options...
FaT3oYCG Posted December 9, 2009 Share Posted December 9, 2009 you are most probably missing a semicolon in the twitter.php file Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/#findComment-974224 Share on other sites More sharing options...
freddyw Posted December 9, 2009 Author Share Posted December 9, 2009 Parse error: syntax error, unexpected '{' in /home2/webusers/07/344740/public_html/aitest/t.php on line 19 Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/#findComment-974237 Share on other sites More sharing options...
mrMarcus Posted December 9, 2009 Share Posted December 9, 2009 is anybody but you supposed to know what's in t.php? at least try a little bit. i can assume it's the code in your first post, but i'm not the one who is supposed to be working here. plus, you know what they say when you assume. Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/#findComment-974242 Share on other sites More sharing options...
FaT3oYCG Posted December 9, 2009 Share Posted December 9, 2009 yeah, if we assume you make an ASS out of U and ME, anyway, there is no possible way for us to help you and as i stated the problem is probably in the twitter.php file (post the code of that file) basically. Link to comment https://forums.phpfreaks.com/topic/184538-syntax-error/#findComment-974298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.