sgs Posted December 23, 2014 Posted December 23, 2014 I've created a php file which creates MySQL Tables. I've added a error variable and a success variable, $err[]=Error messages, $ok[]=Success messages. When running the file I'm neither getting the erro messages nor the success messages. So, can anyone fix my code?Here is my full php script: http://www.pastebin.com/zDEXR06h Quote
wolstech Posted December 23, 2014 Posted December 23, 2014 PHP runs from the top down. You put the code that displays the contents of the arrays before the code that puts the stuff in them. They're always empty because the code that puts the results in hasn't been run yet. Move the code block that shows the array entries (lines 19 to 40) to line 319 (after the queries and if (!$q#) stuff but before the footer) and it should work. 1 Quote
sgjava Posted December 24, 2014 Posted December 24, 2014 I couldn't understand. Please fix the code and give me the url. Quote
sgjava Posted December 24, 2014 Posted December 24, 2014 And one more thing sir, I'm getting the following error:Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/sgs/includes/code_highlighter.php:18) in /home/sgs/public_html/global/layouts/sgs2014.php on line 2Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sgs/includes/code_highlighter.php:18) in /home/sgs/public_html/global/layouts/sgs2014.php on line 2What does it means? Quote
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.