Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: Simple PHP/MySQL - Fresh Eyes Needed

  1. #21
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    Hey Hey,

    Thanks Neg.... I ended up with two that killed explorer and then one that was 75 bucks when I searched for "Text Editor +PHP Syntax Highlight"...

    As for the code I posted... I'm an idiot... I'll leave it there just to demonstrate what a fool I am... Apparently for this parse error the set_ini didn't matter... so I put it on my other server.. still got the blank page.. didn't realize that I have all the links back to the original server so as soon as I logged in I was back on the original server... I jumped to my test server and boom got an error message..

    Peace,
    HT

  2. #22
    Banned
    Join Date
    Nov 2005
    Posts
    62
    can you post the link to the page?

  3. #23
    Notepad++ is very nice.

    Or you could try PHP editor. Havn't tried it myself but I've been told it's quite good if you use PHP a lot.

  4. #24
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    Originally posted here by csl
    can you post the link to the page?
    Hey Hey,

    It's an internal app for client so no I can't ..

    omin: Thanks.. I'll try it out (PHP Editor).. I'm liking Notepad++ so far... It handles my VBS files not too badly either



    Peace,
    HT

  5. #25
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    HT, is that exactly how your redirect lines are supposed to look, or is that the boards borking them in the name of auto-linking? If that's how it is written in your code, that's one big potential problem, because the Location directive just expects a new URL, no tagging.

    Anyway, the other thing that stood out is that when you write out the stuff for the admins (Change pw, etc) there's no line terminator for the echo statement.

    For doing dev stuff on windows, I use Editplus. It's fast, feature rich, and quite reliable IME, and pretty cheap (lifetime license type dealy).
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  6. #26
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    Originally posted here by chsh
    HT, is that exactly how your redirect lines are supposed to look, or is that the boards borking them in the name of auto-linking? If that's how it is written in your code, that's one big potential problem, because the Location directive just expects a new URL, no tagging.

    Anyway, the other thing that stood out is that when you write out the stuff for the admins (Change pw, etc) there's no line terminator for the echo statement.

    For doing dev stuff on windows, I use Editplus. It's fast, feature rich, and quite reliable IME, and pretty cheap (lifetime license type dealy).

    Hey Hey,

    Yeah the boards are screwing with them... they look like standard header lines, and yeah the missing terminator.. and a missing . to concatenate were my problems.. as soon as I saw it with syntax highlighting I fixed it....

    Peace,
    HT

  7. #27
    Now, RFC Compliant! Noia's Avatar
    Join Date
    Jan 2002
    Posts
    1,210
    as far as text editors go, I'd go for SciTE personaly;

    A few points btw;
    1) Replace your include statements with require_once, most of the ones you use will be required, so you don't want the program to continue without them and you don't want the same file included more than once. Atleast this holds true under normal circumstances

    2) Your header tags have "s that need escaping

    3) Your query should preferably have a 'or die("something");' statement to go with it although its not strictly needed in this case.

    I personaly, would write a error-handeling class for this sort of application, it takes a lill while to code but saves you alot of time when you can simple go mysql_query($bleh) or $error->message_die_log(mysql_error(),'Some error','the query failed and stuff','index.php); which would forexample log mysel_error(), display a simple error message and redirect to index.php after a given amount of time.

    Hope thats of some use to you good luck
    With all the subtlety of an artillery barrage / Follow blindly, for the true path is sketchy at best. .:Bring OS X to x86!:.
    Og ingen kan minnast dei linne drag i dronningas andlet den fagre dag Då landet her kvilte i heilag fred og alle hadde kjærleik å elske med.

  8. #28
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    Originally posted here by Noia
    A few points btw;
    1) Replace your include statements with require_once, most of the ones you use will be required, so you don't want the program to continue without them and you don't want the same file included more than once. Atleast this holds true under normal circumstances
    One quick note about require vs include, require will stop your script from running at all should the file be missing (ie: you may not even get your errors displayed, tho those sorts of bugs seem to be related to specific versions). Both require() and include() have siblings that check to ensure a file is not already included (require_once and include_once). In your code HT, I don't really see that as being a relevant problem. I take it that it's fixed now tho from your last statement?

    3) Your query should preferably have a 'or die("something");' statement to go with it although its not strictly needed in this case.

    I personaly, would write a error-handeling class for this sort of application, it takes a lill while to code but saves you alot of time when you can simple go mysql_query($bleh) or $error->message_die_log(mysql_error(),'Some error','the query failed and stuff','index.php); which would forexample log mysel_error(), display a simple error message and redirect to index.php after a given amount of time.
    PEAR:B already covers all the error handling and such.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  9. #29
    Senior Member
    Join Date
    Jan 2003
    Posts
    3,915
    Hey Hey,

    chsh, yeah it's working now, thanks again..

    Noia, I'll look those over and see what I can do/feel like doing...


    Anyway's I've got myself a timeline laid out.... However I was out talking about work on Friday night with abuddy, just shooting the ****, bitching, complaining, talking about current projects, prolly said more than I should have... but it's always how we've talked.. well I think my boss was sitting behind me.. I just sort of noticed him out of the corner of my eye, not really sure if it was him or not... I'm a little worried about getting reamed out come Monday... or worse.... Maybe I won't have to worry about the timeline.

    Peace,
    HT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •