|
|
#10 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
|
ok... I see where you going, but what I am wanting to do is take the index.php?action=www.themaxfiles.info < domain from there and compare it to the database..
I would like to be able to compare what ever domain is added to the end, to the database... MJ and as you can see, $action is locked to one domain, I would like to change that to be using any domain compare to the database, and if the domain is there display a 1 and if not a 0. |
|
|
|
|
|
#11 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
|
You changed your url mid-stream, originally it was ?domain= now it is ?action=. That is the variable name in $_GET[''].
So, if you want to see if the variable is found in the database, one way is: PHP Code:
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
| This user thanks cowboy for this great post! | panache (January 3rd, 2007) |
|
|
#12 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
|
New Year's dinner is black-eye peas and ham with sourdough corn bread.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#13 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
|
ok I did all that and its still not giving me a true answer..
also I thought that you had to have something to compare the action against the result.. maybe I Am still confused on this.. Last edited by panache; January 3rd, 2007 at 11:29 PM.. |
|
|
|
|
|
#14 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
|
Let me see your coding and database structure. OK to PM if you wish.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#15 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
|
ur purple, I'm blue, I dont got that ability..
db is called test on my account.. Code:
CREATE TABLE `hlsremote` ( `ID` int(9) NOT NULL auto_increment, `domain` text NOT NULL, `date` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -- Dumping data for table `hlsremote` -- INSERT INTO `hlsremote` VALUES (1, 'www.themaxfiles.info', '2007-01-01 00:00:00'); INSERT INTO `hlsremote` VALUES (2, 'www.panacheweb.net', '2007-01-01 00:00:00'); thats what the db structure is I want to simply compare the the domain in the db with what someone would put at the end of index.php?action=www.themaxfiles.info I just want it to check the database and see if the domain is in the database.. with your last example, I changed everything as it would say in my db, and I used any number of domains and it came back as those domains where there in the db while infact they were not there... |
|
|
|
|
|
#16 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
|
Sorry to mislead you by not including the array extraction statement. This example does work (tested).
PHP Code:
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
| This user thanks cowboy for this great post! | panache (January 4th, 2007) |
|
|
#17 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Dec 2005
Lives in my computer
Hosted on pass86'd
660 posts
Gave thanks: 56
Thanked 14 times
|
ok I ran this against the data that I have... but the else is not proving a negative, its only showing a positive... thats where I am having the issue.. if I put a domain in thats not in my db its showing a positive result...
if this equals this then say this else say that... its not saying that, its still saying this... the else part is not working for some reason.. |
|
|
|
|
|
#18 (permalink) | |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
|
Quote:
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|