Home > syntax error > parse error syntax error unexpected t_return php

Parse Error Syntax Error Unexpected T_return Php

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn syntax error unexpected 'return' (t_return) laravel more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags

Parse Error: Syntax Error, Unexpected 'return' (t_return) In

Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected T_RETURN [closed] up vote 0 down vote favorite Getting this Problem. Tried my best, I looked up some stuff and they said that it could be the line above the error line (btw the error line is the "return mysql_insert_id();). Any help? function user_register($email, $name, $password) { $email = mysql_real_escape_string($email); $name = mysql_real_escape_string($name); mysql_query("INSERT INTO 'users' VALUES ('', '$email', '$name', '".md5 ($password)."')" return mysql_insert_id(); } php sql share|improve this question asked Nov 15 '11 at 0:12 user1043816 69311 closed as too localized by casperOne Dec 13 '11 at 19:11 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted Missing a closing paren: function user_register($email, $name, $password) { $email = mysql_real_escape_string($email); $name = mysql_real_escape_string($name); mysql_query("INSERT INTO 'users' VALUES ('', '$email', '$name', '".md5 ($password)."')"); return mysql_insert_id(); } share|improve this answer answered Nov 15 '11 at 0:13 AlienWebguy 56.3k1374111 Wow that was it? Well thank you :D –user1043816 Nov 15 '11 at 0:16 Glad to help :) –AlienWebguy Nov 15 '11 at 0:24 2 @user1043816 you should click the check mark to accept this answer. –Maverick Nov 15 '11 at 0:25 add a comment| up vote 2 down vote You forgot ); after your query. share|improve this answer answered Nov 15 '11 at 0:13 Daniel A. White 120k24235330 add a comment| Not the answer you're looking for? Browse other questions tagged php sql or ask your own question. asked 4 years ago viewed 9609 times active 4 years ago Visit Chat Linked 0 Parse and syntax error

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse error: syntax error, unexpected 'return' (T_RETURN) up vote -2 http://stackoverflow.com/questions/8129978/parse-error-syntax-error-unexpected-t-return down vote favorite I am having an issue with accessing my WP-Admin on my Wordpress site. I keep getting this message: "Parse error: syntax error, unexpected 'return' (T_RETURN) in /home/rugguru/public_html/wp-includes/pluggable.php on line 1173". Any solutions? Below is the code on line 1173. $status = apply_filters( 'wp_redirect_status', $status, $location ); if ( ! $location ) return false; $location = wp_sanitize_redirect($location); if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' ) status_header($status); http://stackoverflow.com/questions/26980104/parse-error-syntax-error-unexpected-return-t-return // This causes problems on IIS and some FastCGI setups header("Location: $location", true, $status) return true; } endif; php wordpress share|improve this question edited Nov 17 '14 at 19:30 rici 104k1181136 asked Nov 17 '14 at 19:11 TroyMcClure 84 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Your header line is missing a semi-colon. It may not be the line producing the error, but I'd start with that :) header("Location: $location", true, $status); Here's what I meant in the comments, about the if statement if ( ! $location ) return false; $location = wp_sanitize_redirect($location); if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' ): // note the colon status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location", true, $status); return true; endif; // no } necessary or you could do this if ( ! $location ) return false; $location = wp_sanitize_redirect($location); if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' ) { status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location", true, $status); return true; } if neither of these are what you are aiming for, I can only assume the endif belongs to another if statement outside of the scope of code

here for a quick overview of the site Help Center Detailed answers to any questions you http://stackoverflow.com/questions/8475914/parse-and-syntax-error-unexpected-t-return might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or http://www.webdeveloper.com/forum/showthread.php?250438-Parse-error-syntax-error-unexpected-T_RETURN posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of syntax error 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Parse and syntax error, unexpected T_RETURN [closed] up vote 0 down vote favorite I got this problem. I was editing the Theme functions of my site when this occured: Parse error: syntax error, unexpected T_RETURN in /home/akoni77/public_html/katolikongpinoy.org/wp-content/themes/magazine-basic/functions.php syntax error unexpected on line 203 When I looked up in the notepad, the line 203 will be on the highlighted (asterisked) line: } else { $pbt_site = 800; $pbt_sidebar = 180; $pbt_sidewidget = 160; $pbt_content = 560; } // Set the content width based on the theme's design and stylesheet. if ( = isset( $content_width ) ) **$content_width = $pbt_content;** function pbt_header_css() { global $pbt_site, $pbt_sidebar, $pbt_secondsidebar, $pbt_sidewidget, $pbt_sidewidget2, $pbt_content; ?>