[SOLVED] I need a good eye real quick please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

[SOLVED] I need a good eye real quick please

Post by fresh »

I screwed this script all to heck and back, it wont parse out the contents, after the form has been submitted, it's got to be because of the bracket setup, please, someone look at this and fix it, I'm going nuts, and making people mad... here's my script:

Code: Select all

fixed thanks
I will owe you big time... thanks in advance... :oops: :cry:
Last edited by fresh on Fri Jul 09, 2004 2:37 am, edited 1 time in total.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Code: Select all

if(!$_POST['uname'] | !$_POST['passwd']) {
try

Code: Select all

if(!$_POST['uname'] || !$_POST['passwd']) {
or

Code: Select all

if(empty($_POST['uname']) || empty($_POST['passwd'])){
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

hmm

Post by fresh »

where? and why? You think my brackets arent the problem?

P.s. I know for a fact it's the brackets, because I had it working but it was throwing up, no directory or file exists, warning, but it still showed the part that I said is not being parsed... so when I added the if statement, file_exists > return; , thats when it all went to hell... could you look at the brackets, I dont see any mistakes there, but I know thats it... :?:
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

wouldn't it be easier to put the code in 2 files and include it? or put it in a file, put a pointer where it should split, explode it, echo it....saves lot work work space, easier to move around the file to see where it would echo aswell.
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

yeah

Post by fresh »

i'll do that later, I got it working, finally!! Can I ask, how do you check to see if a directory exists??? thanks :D
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

[php_man]is_dir[/php_man]
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

hey

Post by fresh »

thanks, hey would the syntax go:

if(is_dir("my_dir/")) {
echo "yes";
} else {
echo "no";
}

??? thanks
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

yup. If it runs on your machine it runs on a remote machine (should, at least) ;) There are also some code-examples and alternatives in the user-notes of the php-manual.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Fresh, you should have left the code in your original post so if anyone else runs into the same problem, hopefully they could solve it from this post.

Thanks

Mark
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

sorry

Post by fresh »

it was really buggy, almost worthless... all I did was rearranged my brackets, and it worked then, but, still is and was, really buggy... sorry, normally I would ;)
Post Reply