BrettHartel Posted December 6, 2012 Share Posted December 6, 2012 Thank you for taking the time to help me. I keep getting the error: Parse error: syntax error, unexpected ',' in /home/*** on line 90 What did I do wrong? Here is my set cookie code which starts at line 90: setcookie( "User_ID", $User_ID, time()+60), "/", "***.com" ); setcookie( "FirstName", $_POST[FirstName], time()+60), "/", "***.com" ); setcookie( "LastName", $_POST[LastName], time()+60), "/", "***.com" ); setcookie( "eMail", $_POST[eMail], time()+60), "/", "***.com" ); setcookie( "Day", $_POST[Day], time()+60), "/", "***.com" ); setcookie( "Month", $_POST[Month], time()+60), "/", "***.com" ); setcookie( "Year", $_POST[Year], time()+60), "/", "***.com" ); Sincerely, Brett Hartel Quote Link to comment https://forums.phpfreaks.com/topic/271688-parse-error-syntax-error-unexpected-in-home-on-line-90/ Share on other sites More sharing options...
kicken Posted December 6, 2012 Share Posted December 6, 2012 1) You need to quote your array keys, as in: setcookie( "FirstName", $_POST['FirstName'], time()+60), "/", "***.com" ); 2) You have an extra ) on each line after your expires argument. Quote Link to comment https://forums.phpfreaks.com/topic/271688-parse-error-syntax-error-unexpected-in-home-on-line-90/#findComment-1397923 Share on other sites More sharing options...
BrettHartel Posted December 6, 2012 Author Share Posted December 6, 2012 I added the quote to the array keys but I know know what you mean by an extra ), I am not seeing it. Besides for the quote i cannot see a difference between what you and I wrote. I get the same error message after updating the quote. I now have this: setcookie( "User_ID", $User_ID, time()+60), "/", "***.com" ); setcookie( "FirstName", $_POST['FirstName'], time()+60), "/", "***.com" ); setcookie( "LastName", $_POST['LastName'], time()+60), "/", "***.com" ); setcookie( "eMail", $_POST['eMail'], time()+60), "/", "***.com" ); setcookie( "Day", $_POST['Day'], time()+60), "/", "***.com" ); setcookie( "Month", $_POST['Month'], time()+60), "/", "***.com" ); setcookie( "Year", $_POST['Year'], time()+60), "/", "***.com" ); Did you mean: setcookie( "FirstName", $_POST['FirstName'], time()+60, "/", "***.com" ); ? subtract the ) after the 60. Quote Link to comment https://forums.phpfreaks.com/topic/271688-parse-error-syntax-error-unexpected-in-home-on-line-90/#findComment-1397929 Share on other sites More sharing options...
BrettHartel Posted December 6, 2012 Author Share Posted December 6, 2012 (edited) Oh, i took the ) after the 60 away and it sent. Now I get this error and Im not sure how to fix it before the header since i don't include a header in my .php file. Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 90 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 91 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 92 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 93 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 94 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 95 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 96 Warning: Cannot modify header information - headers already sent by (output started at /home/***:5) in /home/*** on line 97 Array ( [s_pers] => s_lv=1354518011413|1449126011413; s_lv_s=First%20Visit|1354519811413; ) Edited December 6, 2012 by BrettHartel Quote Link to comment https://forums.phpfreaks.com/topic/271688-parse-error-syntax-error-unexpected-in-home-on-line-90/#findComment-1397930 Share on other sites More sharing options...
kicken Posted December 6, 2012 Share Posted December 6, 2012 see HEADER ERRORS - READ HERE BEFORE POSTING THEM Quote Link to comment https://forums.phpfreaks.com/topic/271688-parse-error-syntax-error-unexpected-in-home-on-line-90/#findComment-1397933 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.