Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: PHP error

  1. #11

    When validating forms and doing page redirection using the header function, I suggest to put your codes above the <html> tag or basically before the page is loaded. I believe you placed your codes below the <body> tag that's why the header function did not work or return an error message.

  2. #12
    bai ayaw gamita ang
    header('location: index.php');
    if naay mag una nya na mga functions og methods.
    recommended na xa ebutang sa babaw sa <html> na tag

    mo check rana xa if naay wala ni satisy sa condition.. lahe man na xag behavior gd..
    epasa naka sa lain na website pero nag dagan jpung ang mga methods sud sa emong php..

    den i suggest.. botange panag trappings emong SQL lines. kay pwede pa na mga PHP INJECTION


    TRY THIS BAi.. akong PROJECT with HEADER()
    HOROSCOPE

    HOROSCOPE SITE na xa mo input sa emong NAme, day og year den after ana epasa ka dnhi

    http://kingromz.clanteam.com/horoscope.php

    ara makita ang result..
    pero what if modrtso nalng ko sa horoscope.php.. dli moagi sa index.. moerror jud xa
    mao ang gamit sa HEADER

    <?php

    if(empty($_POST['name'])){
    header(location: index.php)
    }

    <html>


    eng ana pag gamit sa header bai.. sa emong case if succesful cya maka log in..
    paghemo lang lain na php para modawat ana ayaw lang xa eredirect sa index nmo..

    hope natabangan taka.

    ako nya epakita nmo akong forum na site where maka register ka,den mo log in pa jud.
    currently naghemo pako. pero saun raman na xa,if passion jud ang web apps.. take care bro

  3. #13
    Quote Originally Posted by kingromz View Post
    bai ayaw gamita ang
    [COLOR=Black]header('location: index.php');
    if naay mag una nya na mga functions og methods.
    recommended na xa ebutang sa babaw sa <html> na tag

    mo check rana xa if naay wala ni satisy sa condition.. lahe man na xag behavior gd..
    epasa naka sa lain na website pero nag dagan jpung ang mga methods sud sa emong php..
    ok ra na xa basta butngan lng nimo ug exit;

    read post #5 and 6...

  4. #14
    Quote Originally Posted by xiao_xiao View Post
    ok ra na xa basta butngan lng nimo ug exit;

    read post #5 and 6...
    error lage na basta naa solod sa <html> nga tag bisan pa naay exit();

    mao ni ang error : Cannot modify header information – headers already sent

  5. #15
    that's why gani mag gamit ka ug
    ob_start(); ug ob_end_flush();

  6. #16
    geez guys... read post #4, 5, and 6...

  7. #17
    explain daw ngano wla to ni error using ob_start(); ?

  8. #18
    Quote Originally Posted by doomsweek View Post
    ob_start() solves the problem by starting output buffering. This means that any output won't be sent until it has reached the ob_end_flush() file.
    ... ...

  9.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. Form to Email Php error
    By roiancuares in forum Websites & Multimedia
    Replies: 4
    Last Post: 05-10-2013, 05:31 PM
  2. help php error sending email via localhost
    By roiancuares in forum Websites & Multimedia
    Replies: 5
    Last Post: 03-07-2013, 10:50 PM
  3. need help: php error
    By snowleopard in forum Programming
    Replies: 4
    Last Post: 11-26-2011, 08:06 AM
  4. Need help... PHP Error
    By dezheavensent in forum Programming
    Replies: 6
    Last Post: 06-19-2009, 12:29 PM
  5. Replies: 2
    Last Post: 09-11-2008, 10:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top