Simple IF Statement

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

User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Add
echo "Your IP".$visitor_ip."&Mysql_NUM_ROWS".$num_rows."!";
Before
echo "Hello You Are Already Voted";
And tell Me Ehats It Showing

==================================
Its For Testing Purpouse
=================================
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

Ok next time I will be sure to say, and "Now Borats Code" becasue you helped so much, I was just inferring it as my code becasue I am using it, therefore Its mine? Neel made it for me...

And yes I checked that the IP was insterted into the table.
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

Your IP68.195.134.89 &Mysql_NUM_ROWS 2!
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Did You Added Thaat Line
Run It And Test It
And tell If There Is any Error Message.
And Also Tell Me The Out Put
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Ya I Have Got It
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

nickman013 wrote:Your IP68.195.134.89 &Mysql_NUM_ROWS 2!
So after looking at your if statement, considering that mysql_num_rows equals two, what appears to be wrong?
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Replace This
if($num_rows == 1)
With
if($num_rows >= 0)
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

thanks alot!!!!!!!!
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

But Its Not Fair
That There Will Be 2 IP Addresses In Under That Field
Cause Its Based On A Voting System As Uou Told
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

nickman013 wrote:Ok next time I will be sure to say, and "Now Borats Code" becasue you helped so much, I was just inferring it as my code becasue I am using it, therefore Its mine? Neel made it for me...

And yes I checked that the IP was insterted into the table.
Also, I wasn't at all referring to my contribution, but to your lack of contribution to the script. For someone with as many posts as you have, who has apparently been programming for so long, I'm astonished at how dependent you are on other peoples' generosity in writing code for you, and also your attitude toward people who are trying to help you, or complete disregard for it. I hope for your sake that you consider picking up a book, or reading a tutorial, and begin to try learning these things for yourself.
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

high five
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

oh well :roll:
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

aaronhall wrote:oh well :roll:
Image
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Ha ha Its Funny
Cartoon Show In PHP Forum I Like To See Cartoons
Post Reply