Home > Php Parse > Php Parse Error Syntax Error Unexpected T_case

Php Parse Error Syntax Error Unexpected T_case

tep_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '">' . share|improve this answer edited Nov 11 '11 at 17:57 Samuel Liew 32.2k2282105 answered Nov 11 '11 at 15:01 Johan Koele 133 add a comment| Not the answer you're looking for? mysql_error()); } //$output = "Select * From $table"; SELECT CASE $desc WHEN = ALL TYPES THEN $output = mysql_query("SELECT * FROM {$table} WHERE Part_Name LIKE '$notes%' AND Sub_Category LIKE '$subcats%' AND It looks like much of your functionality could be solved with functions rather than switch. navigate here

Username Password I've forgotten my password Remember me This is not recommended for shared computers Sign in anonymously Don't add me to the active users list Privacy Policy Search: Advanced Forum break; ?>
*' . How much interest did Sauron have in Erebor?

You need either use goto or switch. Reply With Quote Quick Navigation General Help Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums PHP Help General Help Newbies Database Install Coding Code Critique tep_image_button('button_delete.gif', IMAGE_DELETE) . ''); $contents[] = array('text' => '
' . tep_image_button('button_restore.gif', IMAGE_RESTORE) . ' http://stackoverflow.com/questions/12920719/php-parse-error-syntax-error-unexpected-t-default What usually happens is that you've missed a single/double quote somewhere higher up the code, which causes the problem lower down.

TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "'"); $db->Execute("delete from " . My website Reply With Quote 25 Sep 2014,03:26 PM #4 lukaswlu View Profile View Forum Posts View Blog Entries View Articles New Zenner Join Date Mar 2014 Location Canada Posts 31 phpBB Support The Support related areas in our community forums. When I modified the acp_users.php file, I accidentally pasted the mChat MOD code outside the right bracket directly above the Code: Select all// Assign general variablesline.

up vote 0 down vote Try to delete default:. http://board.phpbuilder.com/showthread.php?10338969-unexpected-T_CASE-error WHEN = ALL TYPES THEN $output = mysql_query("SELECT * FROM {$table} WHERE Part_Name LIKE '$notes%' AND Sub_Category LIKE '$subcats%' AND Category LIKE '$cats%' AND Description = 1"); ELSE $output = mysql_query("SELECT TABLE_REVIEWS . " where customers_id = '" . (int)$customers_id . "'"); } else { $db->Execute("update " . TEXT_INFO_HEADING_RESTORE_LOCAL . ''); $contents = array('form' => tep_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '

' .

Check for a missed bracket or some other syntax error in your script. check over here default: ?>

switch found something else

TEXT_INFO_HEADING_NEW_BACKUP . ''); $contents = array('form' => tep_draw_form('backup', FILENAME_BACKUP, 'action=backupnow')); $contents[] = array('text' => TEXT_INFO_NEW_BACKUP); $contents[] = array('text' => '
' . Back to top #5 Function Function Member Members 19 posts Posted 28 January 2012 - 08:19 PM I'm just a beginner in PHP. share|improve this answer answered Nov 11 '11 at 15:19 Gustav Bertram 8,14212051 add a comment| up vote -1 down vote It's an easy fix - don't use ; use : instead. http://iipseconline.com/php-parse/php-parse-error-syntax-error-unexpected-t-clone-expecting-t-string.html Hola!

Hence the fix isn't simple. phpBB Ideas Suggest, vote on and comment on ideas for phpBB. I'm not going to hold your hand and write the code for you - ain't nobody got time for that!

BlueHost.com • Web Hosting UK • HostMonster • FastDomain Hosting • Advertise on phpBB.com Powered by Titania © phpBB Limited © 2000, 2002, 2003, 2007 phpBB Limited • Contact Us

If you would like us to look, post the entire relevant code (at the very least, the entire switch statement.) and wrap it in code tags. To start viewing messages, select the forum that you want to visit from the selection below. Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #4 huzi8t9 D.I.C Regular Reputation: 25 Posts: 358 Joined: 11-July 07 Re: ( ! ) Parse error: syntax asked 4 years ago viewed 4871 times active 4 years ago Visit Chat Related 2787How can I prevent SQL injection in PHP?530What is the best collation to use for MySQL with

tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' weblink tep_image_button('button_restore.gif', IMAGE_RESTORE) . '

TEXT_INFO_USE_NO_COMPRESSION); if (file_exists(LOCAL_EXE_GZIP)) $contents[] = array('text' => '
' . Didn't know anything like that existed, but now when I know I will be sure to use it Make sure that you read all answers and try them out before asking It might be in the code just above. Back to top #4 lonewolf217 lonewolf217 Advanced Member Members 642 posts Posted 28 January 2012 - 08:01 PM the problem is that obviously it was not expecting it, so you would

TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); $db->Execute("delete from " . switch($var): ?>

perhaps you didn't close a brace or something so it wasn't expecting the next case statement yet. endswitch; ?> Expected result: ----------------

switch found one

Actual result: -------------- PHP Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT in __FILE__ on line xxx Patches Add Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all Reply With Quote 05-06-2007,08:00 AM #4 Piranha View Profile View Forum Posts Senior Member Join Date DIR_FS_BACKUP . $backup_file); break; case 'zip': exec(LOCAL_EXE_ZIP . ' -j '

phpBB Bug Tracker Report problems with phpBB core and other sub-projects such as the Website, Customisation DB, and Team Tools here.