d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Php Error Code Output Problem > Help Meeh :d
Add Reply New Topic New Poll
Member
Posts: 2,182
Joined: Dec 18 2006
Gold: 312.49
Aug 27 2013 07:35am
So my problem is i have a login.php in which i test if the user exists, combination is correct etc.
if something is not correct i obviously output an error in that php file but the browser opens a blank page and outputs the error.

My Problem is that i dont know how to get my error output from that php file to be output in my index.php since i have my login form as kind of a sidebar in my index.php

thanks in advance :)
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Aug 27 2013 08:00am
wait let me get this strait your checking to see if a user exists on the login page, but you want the error to output on the index?
if thats the case, put the action and error checking of your form to index.php (im pretty sure whats what you do, i havent tested it tho). not sure why you would want an error to appear on a page that the user isnt on, is beyond me, but hey its not my site.

This post was edited by AkuuZ on Aug 27 2013 08:02am
Member
Posts: 2,182
Joined: Dec 18 2006
Gold: 312.49
Aug 27 2013 09:03am
nah it´s not like that :D the problem is on my index page is my top menu main menu etc and a content field AND my login form the login is not an extra page.
That´s the problem :) if the login page would be an extra page it would be easy to output the errors right ;)

so my login_menu.php ( which is included in the index.php ) has to get the error output information from the login check file :)
Member
Posts: 237
Joined: Aug 6 2011
Gold: 6,026.00
Aug 27 2013 10:32pm
Can we see some code? Sounds like you're just exiting the entire script after the error triggers and your echo it back to the client. Just to be sure, by error you mean erroneous login info and not a php script error?
Member
Posts: 2,182
Joined: Dec 18 2006
Gold: 312.49
Aug 28 2013 05:00am
ok thank you nevermind i just made a new site where ppl have to log in, since the other stuff doesnt work :D
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll