Reply
Php Install! Help!!! Please
Old 07-17-2004, 02:58 PM Php Install! Help!!! Please
Novice Talker

Posts: 13
Ok First i installed Collgelinux, then gentoo, then Redhat 9, and finally im on Fedora. Now everything on Fedora is up to date well php version (4.3.6) but o well. I have everything installed, and php code like <?php phpinfo(); ?> works. But the Query_sting doesnt work, so if I code like <?php if($id == "check"){?>check<?php }?> . When someone types file.php?id=check that page should come up. But nope! I have spent so many hours installing everything, please help me. How do I allow for the query string to read? THANKS!!!!!
pleasehelpa is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 07-17-2004, 03:00 PM
Republikin's Avatar
Super Moderator

Posts: 3,191
Which page should come up....More complete code would really help us to help you.
Republikin is offline
Reply With Quote
View Public Profile
 
Old 07-17-2004, 03:08 PM
Novice Talker

Posts: 13
Well i make a page in /var/www/html/ cause thats where my root document is. Well I add any page like index.php. I set the permissions so everyone (group, owner, others) can read. When I add <?php phpinfo();?> to the script, it shows the php info. But when I add something like <?php ($id == "test"){ echo "it worked!"; } ?> Then I goto index.php?id=test . But it doesnt work! how Do I make this work?? THANKS!
pleasehelpa is offline
Reply With Quote
View Public Profile
 
Old 07-17-2004, 03:10 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
PHP and Unicode with UTF-8
Posts: 3,108
Location: Toronto, Ontario
I think he's referring to the text "check" coming up when the query string is id=check.

Your problem probably lies in your php.ini configuration. It is now default to have register_globals off in the php.ini, you should be using the superglobals to access incoming variables. Rewrite your page to use $_GET[]'s for query strings.

PHP Code:
<?php if($_GET['id']== "check"){?>check<?php }?>
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 07-17-2004, 03:15 PM
Novice Talker

Posts: 13
Yeah but I already have so much coding in php with the $id == "this" . I mean I already have about 2 15,000 line coding projects with a ton of $id == "this". Thanks!
pleasehelpa is offline
Reply With Quote
View Public Profile
 
Old 07-17-2004, 04:20 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Although it's better programming style to change all your projects to use the 'proper' way to access variables, you can return to the old way of doing it by turning on register_globals in php.ini.
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Reply     « Reply to Php Install! Help!!! Please
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13129 seconds with 13 queries