• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

[PHP] Need help with image upload script

amirk999

New Member
I am bringing back my image host with a new script. I want to add a logo at the top of each page. I added the HTML code before <?php, but I get this error:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/amirk999/public_html/image/index.php:2) in /home/amirk999/public_html/image/index.php on line 67

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/amirk999/public_html/image/index.php:2) in /home/amirk999/public_html/image/index.php on line 67

URL is: http://image.amik.biz

Thanks
 
Possibly causes:
1.session_start() is initialized after header.
2.there is output to browser when you declare: header("Location: /path/to/file");

Solutions:
1.repair the code
2.use output buffering.
 
You answered your own question :)

I added the HTML code before <?php
If you want to manipulate the HTTP headers (which is what you're doing if you use cookies) then the code for that has to be at the very start of your page.
 
so how can I add images and other codes to the code without messing it up?
I tried different methods, and I either get parse errors or this :(
 
Thanks :)
The main image works now, and now does anyone know how to put a Google ad in php?
I tried echo " "; but because Google already put some stuff like that at the end, it gives me parse errors.
 
how does the google ad code look like? if it has some double quote, escape it like this \". or simply use single quote on echo()
 
I made the google code 1 link and put /# on all of it, but now it doesn't give me errors, but it doesn't even show up anymore.
How do I use echo ()?
echo (code) or echo () code";?
 
nope, can you paste the code here so i can show you. btw, # is used for commenting, it will not really show up.
 
Originally posted by kabatak
nope, can you paste the code here so i can show you. btw, # is used for commenting, it will not really show up.

sorry, I meant ",

Can I PM you because I am not really allowed to post it :(
 
Back
Top