Forum Moderators: coopster

Message Too Old, No Replies

PHP 5 Variables

Passing Variables in PHP 5

         

dunhill

8:54 am on Jul 8, 2009 (gmt 0)

10+ Year Member



Hi,

Im really confused and need your help please.

My website runs under PHP 4, and my below code works 100%, I need to run my website under PHP 5 so that I can run some new code.

I have the ability under cpanel to Enable/Disable PHP 5

When I switch to php 5, it appears that my code where I pass 2 variables from 1 page to another no longer works

Does anybody know why this is? Ive checked the web and I appear to be passing the variables correctly.

Can anybody see a problem with my code, I cut the relevant code out.

Please help - Thank you

[mysite.com...]
-----------------------
$var_curr_place = 'Hollywood';
$v_state = 'LA';

<? @include ("http://www.mysite.com/links/links.php?v_place=$var_curr_place&v_state=$v_state"); ?>
-----------------------

www.mysite.com/links/links.php
-----------------------
<?
$v_place = $_GET['v_place'];
$v_state = $_GET['v_state'];

?>
<?
include ("db_connect.php");

$sql="select * from places where place != '$v_place' and state = '$v_state' order by place_name";
$result = mysql_query($sql);
$nrows = mysql_num_rows($result);
-----------------------

henry0

12:02 pm on Jul 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should not use <?
but use: <?php
Anyway with the coming of php6 the short tag will be "illegal"
And are you sure that your php5 ini file allows for short tag?
another reason to mod all of your scripts to <?php

check that first and report.