Current location: Hot Scripts Forums » Programming Languages » PHP » PHP4 to PHP5 issue help


PHP4 to PHP5 issue help

Reply
  #1 (permalink)  
Old 11-20-09, 04:19 PM
tc325 tc325 is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
PHP4 to PHP5 issue help

i have a page with a switch statement

on php4 i was able to put this line of code in the add bar "video.php?viewby=job&&job=AI-5254"

and now on php 5 that doesnt work im not recieving any errors

any suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-20-09, 04:53 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
You're gonna have to post your code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-20-09, 04:54 PM
therocket954's Avatar
therocket954 therocket954 is offline
Community Liaison
 
Join Date: Jul 2007
Location: Michigan, USA
Posts: 334
Thanks: 2
Thanked 8 Times in 8 Posts
Switch is still OK with PHP5, hmmm..

Are you "GET" 'ing the URL parameters before using them? Kinda like this:
PHP Code:

$viewby $_GET['viewby'];
$job $_GET['job']; 
Otherwise, post some code and that'll help
__________________
--Eric Allison
Twitter: http://www.twitter.com/Eric_Allison
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-20-09, 07:20 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Turn on error reporting and error display.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 11-21-09, 10:59 AM
tc325 tc325 is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
$job = $_GET['job'];

that was it thanks why do u need to add the GET now?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 11-21-09, 01:21 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Ah, I know now what's happening.

Your old PHP configuration had "register globals" enabled, and your new PHP 5 configuration has it disabled. It's much more secure this way. So you should get used to it.

PHP: Description of core php.ini directives - Manual
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading php4 to php5 Jay6390 Web Servers 3 05-08-08 08:14 AM
php4 & php5 Baho PHP 3 05-06-05 08:39 AM
Can we make it from PHP4 to PHP5? weilies PHP 2 04-29-05 06:24 AM
PHP5 Hosting account for FREE w/ any purchase! mxhub General Advertisements 0 10-07-04 12:52 PM


All times are GMT -5. The time now is 01:59 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.