How to escape equal sign

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

Post Reply
mavera2
Forum Newbie
Posts: 8
Joined: Sat Sep 03, 2011 11:54 am

How to escape equal sign

Post by mavera2 »

I suppose that the code below doesn't work because of equal signs, ampersands.
How can i fix this?
Thank you

Code: Select all

include_once ('../main/calculate.php?try=1&make=20');
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: How to escape equal sign

Post by nowaydown1 »

You are trying to pass parameters as part of your include. Instead, you should just set the necessary parameters in the superglobal, then do your include like so:

Code: Select all

$_GET['try'] = 1;
$_GET['make']=20;
include_once ('../main/calculate.php');
Post Reply