3 Replies - 1102 Views - Last Post: 15 February 2008 - 07:24 AM Rate Topic: -----

#1 Rajaguru   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 14-February 08

Need help in php

Post icon  Posted 15 February 2008 - 02:48 AM

Hi All,

I need help in PHP. I'm new to PHP. Actually I'm getting header error when try to upload a file in php.

I have two radio buttons which is called Default image and Custom image. If I click the Default image radio btn, the path of the image which is hotcoded shld send to DB[the code to store the value in DB is in this page only.] and redirect to somepage.php.

Unless otherwise if I click the custom image radio btn, the <input type="file" > will appear[This will be hidden when the page load]. Then we will select the file which we want to upload. The problem is here.

If I select the Default image radio btn, the path which I hotcoded are storing in DB but the header error appears on the page and this is not redirect to somepage.php.


Header error is "Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\.........."

But if I select custom image radio btn, it is working fine and redirect to the somepage.php.

can any 1 help to solve this issue? or is there any method to skip the header error and redirect to somepage.php?

Thanks in advance
Guru.

Is This A Good Question/Topic? 0
  • +

Replies To: Need help in php

#2 no2pencil   User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6698
  • View blog
  • Posts: 31,069
  • Joined: 10-May 07

Re: Need help in php

Posted 15 February 2008 - 05:44 AM

View PostRajaguru, on 15 Feb, 2008 - 02:48 AM, said:

Header error is "Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\.........."

can any 1 help to solve this issue? or is there any method to skip the header error and redirect to somepage.php?

Usually this error is caused by code trying to output header information after a print or echo statement, or something else that has already started to generate html code, & therefor headers were already started.

Someone will be able to help you, however we'll need to see the code in order to further be any assistance. We can't magically see what's wrong.

:code:
Was This Post Helpful? 0
  • +
  • -

#3 sevgin   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-August 07

Re: Need help in php

Posted 15 February 2008 - 06:47 AM

Have you written anywhere start_session() ?

http://bulmedia.org
Was This Post Helpful? 0
  • +
  • -

#4 SpaceMan   User is offline

  • D.I.C Addict
  • member icon

Reputation: 10
  • View blog
  • Posts: 507
  • Joined: 20-February 03

Re: Need help in php

Posted 15 February 2008 - 07:24 AM

a min, must have my coffee, reread..

if you can upload the header to line that errors, would be a big help..

part of the posted is above a header function.

Attached File(s)


This post has been edited by SpaceMan: 15 February 2008 - 07:35 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1